Activating Views on Start-up
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:
-
Find the activate access method for the desired view. For example, the access method for a
Customer_Entryview would most likely beActivate_Customer_Entry. To find the actual activation message for any view, open the view in the code editor and look for theActivate_VieworDeferred_Viewline of code, which defines the activation message. -
Add the following line to the end of your program right before the
Start_UIcommand. 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.