Adding the Options and About dialogs

The process of adding additional dialogs to the project is precisely the same as used to create the first dialog, therefore we'll describe the process at a more superficial level.

As before, click the New Dialog button on the toolbar image\bm87.gif and then double-click the dialog caption to bring up the Dialog Properties dialog. Add the %WS_SYSMENU style, and set the size and position properties as follows:


Left  55

Top  48

Width 161

Height  86


Next, well add the following controls to the dialog, and then make a few minor style adjustments to two of the controls:


Control Caption  x, y, w, h

FRAME Options  5, 5, 95, 75

CHECKBOX &Show Prefix  15, 16, 75, 10

CHECKBOX Show &Types  15, 27, 75, 10

CHECKBOX Show &Params  15, 38, 75, 10

CHECKBOX Show P&rops  15, 49, 75, 10

LABEL Scan &Depth  43, 63, 43, 10

TEXTBOX 3  15, 61, 25, 13

SPIN/UPDOWN ""  35, 61, 8, 13

BUTTON OK 105, 10, 50, 15

BUTTON Cancel 105, 30, 50, 15


With those controls created, modify the default styles for the TEXTBOX to include the %ES_NUMBER style. Add the following styles to the SPIN/UPDOWN control: %UDS_SETBUDDYINT, %UDS_ALIGNRIGHT, %UDS_AUTOBUDDY, and %UDS_ARROWKEYS.

For a final touch, set the background color for the dialog and the FRAME, CHECKBOX and LABEL using the Properties dialogs color selector. Using the colors Red=252, Green = 216, Blue = 131 will give a nice shade of orange/brown.

This concludes the Options dialog. Once the About dialog has been added, the project User Interface design will be complete. We'll add the About dialog to the project now.

As before, click the New Dialog toolbar button, and adjust the Dialog Properties as follows:


Caption "About Interface Explorer"

Size/Position 182, 140, 146, 70


And as before, add the %WS_SYSMENU style to the styles properties, and then add the following controls:


Control Caption  x, y, w, h

LABEL Interface Explorer  5, 5, 135, 15

LABEL A PowerBASIC Forms Example project by PowerBASIC, Inc.  5, 20, 135, 20

BUTTON OK 45, 50, 50, 15


Next, set the color of the Dialog and both LABEL controls to R129, G197, and B197. Finally, we'll adjust the font of the first LABEL control, to tweak the appearance of our About slightly.

In the first LABEL controls Properties dialog, click the FONT button. Choose Arial, set the font style to Bold Italic, and the font size to 14. Finally, click OK and save the project as normal.

And thatís it! In a short space of time, the three dialogs that form the heart of our example application have been completely designed and even colorized. Additionally, when the project was saved, the source code for the project was generated too!