Welcome Form

Applications built with VPME display a Welcome form at startup. 

Continue and Exit: The Welcome form provides two command buttons. The Continue button allows you to continue launching the application. The Exit button allows you to immediately close the application.

Help Menu Welcome Form Option: When you click the Continue button, the Welcome form closes. You can redisplay the Welcome form at any time by selecting the Welcome form option on the application’s Help menu. When the Welcome form is redisplayed, the Exit button is disabled.

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

How to Change the Welcome Form

When the Welcome form is accessed in an application, the RunIntroductoryForm method of the Security object runs the form specified in the Security object properties cIntroductoryForm and cIntroductoryForm_ClassLibrary. The cIntroductoryForm property contains the name of the Welcome form or form class. The cIntroductoryForm_ClassLibrary property contains the name of the class library that contains the Welcome form form class, if any.

The Security object is instantiated from the ProSec class in the PROSEC.VCX class library.

Default Property Entries: By default, cIntroductoryForm contains the class name “IntroductoryForm” and cToolbar_ClassLibrary contains the class library name “PROSEC”. You can change these properties to reference whatever Inroductory Form or form class you like. Make your change through the Class Browser or the Project Manager.

Where to Modify the IntroductoryForm Class

You will obviously want to change the Welcome form to fit your application. Most of the time when you change the Welcome form, you will simply modify the IntroductoryForm class in the application’s PROSEC.VCX class library. Normally, each application you create will need it’s own Welcome form.

However, if you want to create a Welcome form that can be inherited by all your applications, modify the IntroductoryForm class in the VPMSEC or DEVSEC class library. Perhaps, you’ll develop a basic Welcome form style that you want to make available to all applications and that you will modify further at the PROSEC level for each application.

You can, of course, create and use a Welcome form, instead of a class.

Where to Identify the Welcome Form Class to Use

Whatever approach you take to modifying the Welcome form, make sure that when the RunIntroductoryForm method of the Security object is run for an application, the cIntroductoryForm and cIntroductoryForm_ClassLibrary properties of the application’s Security Object identify the Welcome form that you want the application to use. Since by default the Security object is instantiated from the ProSec class in the PROSEC.VCX class library, you need to make sure that the cIntroductoryForm and cIntroductoryForm_ClassLibrary properties of the ProSec class identify the Welcome form that you want to use when an application runs. The property entries at the PROSec class level are inherited from the VPMSec class.

If you modify the IntroductoryForm class and do not change its name, the default entries already in the cIntroductoryForm and cIntroductoryForm_ClassLibrary properties will be what you want.

New Class: If you create a Welcome form class with a new name and, perhaps, a new class library, you will need to enter the new name and class library name into the cIntroductoryForm and cIntroductoryForm_ClassLibrary properties at the VPMSec, DEVSec or PROSec class level depending upon whether you want all applications to use the new Welcome form class or just a specific application to use the new class.

New Form: If you create a Welcome form, instead of a form class, you will need to enter the form name into the cIntroductoryForm property and blank out the cIntroductoryForm_ClassLibrary property. Whether you make your entries at the VPMSec, DEVSec or PROSec class level depends upon whther you want all applications to use the new Welcome form or just a specific application to use the new form.

Tip: Property entries at the VPM or DEV level affect all applications. Property entries at the PRO-level affect a specific application.

Tip: To prevent the Welcome form from being displayed, set the lRunIntroductoryForm property to .F. in the ProApp or DevApp class.

More:

Tip of the Day