Using a Modal Form

The following steps describe how to create a simple modal form using Version 2.2 Beta 5 of Smart Mobile Studio.

  1. Start a new Visual Components Project and save the project as "SimpleModalForm".
  2. Add a new form named Form2 by clicking on the second icon in the Project Manager and clicking on OK to accept the default name.
  3. Add a panel then a label and a button on top of the panel.
  4. Change the caption of the label to "Modal Form" and the caption of the button to "OK".
  5. Double click on the button and enter the code for its click procedure in the editor:
    Application.HideModal(mrOK);
  6. Return to the design view of Form1, add a button, change its caption to "Modal Form" and enter the code for its click procedure in the editor:
    Application.ShowModal('Form2', 'W3Panel1', '');
  7. Execute the application and press the button on each form to test the navigation.
Programming - a skill for life!

How to use several forms (including a modal form)