Mastering PowerBuilder

HomePrevious Lesson: Window Services
Next Lesson: Preferences Service

Basic Window Services

As explained in the menu services, each PFC window has a pfc_MessageRouter() event, to route the messages from the menu to the appropriate object. Another basic service is, processing the CloseQuery event. When the user closes 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 the situation where a window opens at the top/bottom of the frame, but he wants it to open in the center of 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 it on:
this.of_SetBase(TRUE)
HomePrevious Lesson: Window Services
Next Lesson: Preferences Service