Now you add a button and text to the application’s main window. When you run the application on the desktop, the main window displays in the position and size that you specify.
Window size on mobile devices On mobile devices, the main window always displays full size and centered.
Double-click w_basic_tutorial_main in the System Tree.
The Window painter opens the application’s main window.
Change the title of the window from Main Window to Hello World on the General page in the Properties view.
Select the Center check box on the General page in the Properties view if it is not already selected.
Now when you run the application on the desktop, the main window will be centered. On the PocketPC or Smartphone, this does not affect the window position.
Select the Close (OK) check box on the General page in the Properties view if it is not already selected.
Now when you run the application on the desktop, you can close it by clicking the window’s Close button in the upper right. On the PocketPC, the Close button becomes an OK button that you can use to Close the application.
Select Insert>Control>CommandButton from the PocketBuilder menu.
In the Layout view, click in the space near the upper left corner of the window.
A command button with the label none displays in the window.
Click the command button.
In the Properties view, change the name property from cb_1 to cb_ok.
Change the text property from none to OK.
Select Insert>Control>StaticText from the PocketBuilder menu.
Click in the space below the command button.
A static text control with the label none displays in the window.
Be sure the static text control is selected.
In the Properties view, change the Name property to st_hello.
Delete the default text property and leave the property blank.
Double click the command button in the Layout view.
The Script view displays with the cb_ok clicked event selected.
Click in the blank script area and type the following code for the clicked event:
st_hello.text = “Hello World”
Select File>Close from the PocketBuilder menu.
Click Yes when you are prompted to save your changes.
Next you run the application.