The main dialog

We'll start by creating our main window. On the toolbar, click the New button image\bm87.gif (or select File | New Dialog, or press CTRL+N) and a new dialog will appear in the design-mode window.

The default dialog size is much smaller than we require so resize the dialog to make it 300x200 dialog units in size. This can be done by a click+drag operation on the lower-right corner of the dialog, or by editing the Size fields in the Dialog Properties dialog.

When using the drag method to resize the dialog, the current size is displayed near the right side of the status bar in the PowerBASIC Forms Window - simply release the mouse button when the desired size is shown. To resize the dialog using the Dialog Properties dialog, either double-click on the caption (title bar) of the dialog, or single-click on an empty area of the dialog then click the Properties button image\bm88.gif in the toolbar.

Next, we'll change the dialog caption and features to suit the project. As noted, double-click the caption or single-click it and choose the Properties button image\bm88.gif.

On the General tab, set the Caption to "Interface Explorer".

On the Styles tab, select the following styles (some of which will have been automatically selected for you):











…and select the following extended styles (these are the default styles and are likely to have been selected automatically):






Finally, click the Ok button (or press the ENTER key). At this point, the dialog should display Minimize and Close buttons on the right side of the caption bar. The caption text should also display "Interface Explorer".

At this point, we'll save the project and assign it a name. Click the Save button image\bm89.gif on the toolbar, or use the File | Save menu item (or use the CTRL+S hot-key), and enter "Interface Explorer" into the file name field, and click OK.

Now that the file is saved, we can take a first look at the project source code. Using the Tools menu, choose Open File in IDE - PBEDIT or use the CTRL+F7 hot-key. The PowerBASIC for Windows IDE editor should open, and display the source code that will create and display our dialog. You can even compile and run the project at this point simply by pressing CTRL+E. While the project does very little so far, it is nonetheless compilable and already shows the beginnings of the project framework, from declarations right through to a Callback Function.

Now close the compiled application, and switch back the PowerBASIC Forms design window. The PowerBASIC for Windows IDE supports a complementary F7 hot-key to switch back to the PowerBASIC Forms window.


Next Step: Adding child controls