As you develop a window, you can preview its appearance from the Window painter. By previewing the window, you get a quick desktop view of how it might look during execution, only without the personal digital assistant (PDA) skin. If the window that you preview has an associated menu, the menu bar will be visible at the top of the window, not at the bottom as on a PDA device or emulator. Size restrictions for windows on the PDA device or emulator are also not applicable to windows that you preview on the desktop.
The control bar is present for main windows that you preview or run on the desktop. You can close a main window that you preview by clicking the close button in its control bar.
You can add a control bar to response windows by selecting the TitleBar check box or adding a Close (OK) button. If you preview a response window that does not have a control bar, you can close the response window by right-clicking the PocketBuilder icon in the Windows task bar and selecting Restore from the pop-up menu. A message box informs you that an application is running. You can then click Terminate in the message box to close the response window and return to PocketBuilder.
Preview button on the PainterBar and the PowerBar You can preview a window from the Window painter by using the Preview button on the PainterBar or clicking the Preview button on the PowerBar. When you use the Preview button on the PainterBar, you do not have to save the window first, but you cannot trigger events, as described later. For information about previewing using the PowerBar button, see “Running a window”.
To preview a window:
Click the Preview button in the PainterBar, or select Design>Preview from the menu bar
PocketBuilder is minimized, and the window displays with the properties you have defined for it.
For information about previewing using the PowerBar button, see “Running a window”.
While previewing the window, you can get a sense of its look and feel. You can:
Move the window (although you cannot do this on the Windows CE device)
Tab from control to control
Select controls
Use scroll bars that you place on the window
You cannot:
Change properties of the window
Changes you make while previewing the window, such as changing radio button selections or entering text in a text box, are not saved.
Trigger events
For example, clicking a CommandButton while previewing a window does not trigger the button’s Clicked event.
Connect to a database
To return to the Window painter:
Do one of the following:
Click the Close button in the control menu in the upper-right corner of the window
On the Windows CE device or emulator, you will not have a control menu in the title bar, although for the Pocket PC platform you can add a Close (OK) button or a SmartMinimize (X) button to the navigation bar. (Smartphone applications do not have Close or SmartMinimize buttons, but typically have a Quit or Done menu assigned to the left soft key.)
You can add a Close button to the navigation bar or title bar for a response window, but not a SmartMinimize button. You cannot preview the navigation bar on the desktop using the Preview feature.
Right-click the title bar and select Close from the pop-up menu
For a main window that is not visible, click PocketBuilder on the task bar and then click the Terminate button
For a response window that does not have a control bar, right-click PocketBuilder on the task bar, select Restore from the pop-up menu, and then click the Terminate button