Mastering PowerBuilder

HomePrevious Lesson: Course 3:: Session 24 :: Page 400
Next Lesson: Course 3:: Session 24 :: Page 420
Basic Window Services

As explained in the menu services, each of the PFC window has an event pfc_MessageRouter() to route the messages from the menu to the appropriate object. Another basic service is processing the CloseQuery event. When the user close the window, PFC automatically checks for any unsaved work and prompts the user and acts accordingly. In any situation, if you don’t want PFC to prompt for the unsaved work, you can disable the service by setting ib_disableclosequery to TRUE.

Many PowerBuilder programmers might have come across a situation where the window opens at the top/bottom of the frame, but he wants the window to open in the center on the screen. PFC solves this problem by providing window center service.

this.inv_base.of_Center()
//This script is for one of the window event.

Before using the window service, you need to turn on the window basic services:

this.of_SetBase(TRUE)

HomePrevious Lesson: Course 3:: Session 24 :: Page 400
Next Lesson: Course 3:: Session 24 :: Page 420