Access Form

Some developers like to provide user access to their applications by displaying an Access Form when an application starts that contains command buttons that lead the user to the application’s functionality. VPME makes it easy for you to display your own Access Form.

Tip: In previous VPME versions, the Access Form was called the “Startup” Form. The name was changed to more accurately denote the purpose of the form. However, in the VPME classes that implement the Access Form, the term “Startup” is still used in the names of classes, methods and properties. Don’t let the class names confuse you. When you see “Startup”, think “Access”.

How to Display an Access Form

When an application is started, the PerformStartupAction method of the Application object performs the startup action that is stored in the cStartupAction property of the Application object. The Application object is instantiated from the ProApp class in the PROAPP.VCX class library

If you want to display an Access Form when your application starts, all you need to do is put a command to display the form in the cStartupAction property of the ProApp class.

In the ProApp class of the VPM Enterprise Sample Application, you will find the following command in the cCtartupAction property:

DO FORM dvsastrt

This command runs the Access Form you see after the Tip of the Day Form when you run the Sample Application.

Tip: You can put any command you want in the cStartupAction property of the application class to run anything you want when your application starts.

Application Toolbar Access Form Button & Help Menu Option: If you put an Access Form in your application, it’s a good idea to put an Access Form button on the Application Toolbar to redisplay the Access Form if it is closed. In addition or alternatively, put an Access Form option on the Help menu that redisplays the Access Form. The VPM Enterprise Sample Application includes an Access Form button and a Help menu option that you can copy. See the Application Toolbar chapter for info about modifying the Application Toolbar.

More:

Access Panel