Activating Windows Views on Start-up

Normally, a Windows program starts up with all views inactive. Users select the view or views they wish to work with by selecting an option from the view menu bar. If you wish, you may customize a program so that one or more views will appear automatically when the program is started.

To auto-activate a view, you should:

  1. Find the activate access method for the desired view. For example, the access method for a Customer_Entry view would most likely be Activate_Customer_Entry. To find the actual activation message for any view, open the view in the code editor and look for the Activate_View or Deferred_View line of code, which defines the activation message.

  2. Add the following line to the end of your program right before the Start_UI command. You may add this code within the Studio by editing the bottom-code area of your program.

Send Activate_Customer_Entry of (oClientArea(oMain))

This assumes that your main program has been created by the Studio and the main outer panel object’s name is oMain and its child client-area object’s name is oClientArea.

You can auto-activate as many views as you wish using this method. The last view activated will be the view that starts with the focus.

 

See Also

General Reference