You use the Window painter to create the starting window, as you do for any window you create in PowerBuilder.
To create your application’s starting (or only) window:
Create a new window object in PowerBuilder.
On the window’s General tab of the Properties view, set the window type to child.
Add other controls as needed.
Write scripts for events of the window and controls.
To convert an existing application to run as a plug-in:
Change the type of the opening window to child.
If you do not plan to specify the APPLICATION attribute of the Embed element, do both of the following:
Remove references to global variables.
Move application setup code from the application’s Open event or MDI frame events to the child window’s Open event.
For information about specifying the APPLICATION attribute, see “Attributes of the Embed element”.
Depending on the application’s design, you may need to redesign how it opens other windows.
Child windows cannot have menus. They are never considered the active window—and therefore the Activate event is never triggered. They can have title bars and can be minimized, maximized, and resized. In the plug-in environment, the child window is always restricted to the space allotted by the WIDTH and HEIGHT attributes specified on the Web page, as follows:
Maximizing causes the window to fill the space allotted by the WIDTH and HEIGHT attributes.
Minimizing displays the window’s icon and title at the bottom of the plug-in’s allotted space.
If the child window is resizable, the user can drag the borders to make the window smaller (but not larger) than the allotted space.
As a result, it is not useful to allow minimizing, maximizing, or resizing of the child window.