Logo and Icons

The Logo and Icons dialog allows you to:

·       Application Logo: Select and position a graphic that VPM Enterprise will display on your application’s main window as the Application Logo.

·       Copyright Notice: Modify the copyright notice that VPM Enterprise displays at the bottom-center of your application’s main window.

·       Application Icon: Select an Application Icon to display when the application window is minimized. The Application Icon is also displayed in the upper left-hand corner of the application window.

·       Form Icon: Select a Form Icon to display when a form is minimized. The Form Icon is also displayed in the upper left-hand corner of forms.

Application Logo

If you select a graphics file in the Application Logo box on the Logo dialog, VPM Enterprise will automatically display the graphic on your application’s main window. You can use a graphic in a .bmp, .gif, .jpg, .png or .tif format.

Tip: Keep the graphic file as small as possible. If you have a graphic you like, but its file size is large (say, over 0.5 MB.), use graphics software to make the file smaller. Graphics software will allow you to crop it, resize it and reduce its colors.

Ø To select an Application Logo graphic

1.   Enter the path and name of the graphics file in the text box beneath the “Image Graphics File” label.

2.   If you don’t know the path or name of the graphics file, click the ellipsis (…) button. VPME displays the Open dialog to locate the file.

3.   When the graphics file path and name are entered and you are finished with the Logo and Icons dialog, click OK.

VPM Enterprise displays the graphic you select through an image control that is created on the application window.

The method just described is the preferred way to select an Application Logo graphic. However, for backward compatibility, VPM Enterprise provides an alternative way to select and display the Application Logo graphic. This alternative approach stores the graphic in the gLogoPic general field in the project’s SVPMAPPLICATIONDEFINITION.APD table. If the Image Graphics File field is blank, VPM Enterprise displays the graphic from the general field using an @…SAY command.

Ø Alternative way to select an Application Logo picture

1.   If you’re going to Copy and Paste the graphic, first copy the picture to the Windows clipboard using whatever method you prefer.

2.   Run VPM Enterprise. Open your project and select Logo and Icons from the Options menu.

3.   Click the Modify Picture button in the Application Logo box. VPM Enterprise opens an editing window for a general field into which you can insert a linked or embedded OLE object.

4.   Click the Edit menu pad. If you copied your graphic to the clipboard, click Paste or Paste Special. Otherwise, click Insert Object and locate your graphic  using the Insert Object dialog. 

5.   When your graphic is displayed in the editing window, close the window.

Tip: This alternative way to select an Application Logo graphic will sometimes display graphic types that the preferred approach will not. Therefore, if you need to display a graphic that is not a .bmp, .gif, .jpg, .png or .tif file, you can try using this alternative approach to displaying the graphic. However, you may find that converting the graphic to a .bmp, .gif, .jpg, .png or .tif graphics format and using the preferred approach works best.

Positioning the Application Logo

After you select a graphic, you must tell VPM Enterprise where to position it. You can tell ProMatrix (a) to center your picture using the height and width of the picture in pixels, or (b) to position the top-left corner of the picture at a specific row and column number. 

Ø To position the Application Logo

1.   Click either the Center option group button or the Specify Position button on the Logo and Icons dialog.

2.   If you click the Center button, VPM Enterprise will automatically center the logo when your application runs.

3.   If you click the Specify Position button, enter the row and column number at which the top-left corner of the graphic should be positioned.

4.   Click OK. Click Run Application on the Object builder to check the logo’s position. 

5.   If you specified a row and column position, return to the Logo and Icons dialog to change the row and column numbers until the graphic is positioned to your satisfaction.

Modifying the Copyright Notice

VPM Enterprise automatically displays a copyright notice at the bottom-center of your application’s main window.  The copyright notice includes your application’s name, version number, the copyright symbol, the year you started the application (as entered on the Developer Information dialog), the current year and your company’s name (as entered on the Developer Information dialog).  The copyright notice looks like this:

VPME Sample Application 9.1

Copyright © 2004 - 2005

ProMatrix Corporation

The code that displays the copyright notice is contained in the memo fields mCRCode1, mCRCode2 and mCRCode3 in the SVPMApplicationDefinition.apd table. Each memo field contains the code to display one line of the copyright notice.

The memo field mPosCRCode contains the code that positions the copyright notice on the application’s main window.

The code in the memo fields is executed through the use of the EXESCRIPT() function.

You can view and modify the copyright code contained in the memo fields by clicking the Copyright Notice buttons on the Logo and Icons dialog.

Tip – Modifying the Copyright Code: You can easily modify the copyright code to change the information it displays. In fact, you can modify the copyright code to display anything you want anywhere on your application’s main window.

Controlling the Logo & Copyright Display Behavior

Default Behavior

The Environment dialog that users of your application can access from the application’s Admin menu contains a Logo check box that turns the display of the Application Logo and Copyright Notice on and off.

When the Logo check box is checked, the Application Logo and Copyright Notice are displayed constantly in the application window. Unchecking the Logo check box turns off the display immediately.

When the Logo check box is unchecked, the Logo and Copyright Notice are still displayed for four seconds when the application loads. After four seconds, the Logo and Copyright Notice are removed from the application window. The initial four second display was implemented because even if an application user turns off the Application Logo and Copyright Notice display, the application developer would normally still want a brief display at application startup for legal and marketing reasons.

Modifying the Display Behavior

You can easily implement alternative display behaviors for the Application Logo and Copyright Notice using the application object properties described below.

lReleaseLogo Property

You can choose to (a) display the Application Logo and Copyright Notice briefly at application startup and (b) eliminate the user option to turn the display on and off.

To implement this alternative display behavior, you set the lReleaseLogo property of the project’s application class (ProApp in the PROAPP.VCX file in the project’s home directory) to .T. If you want this alternative behavior to apply to all your applications, set the lReleaseLogo property to .T. in the DEVApp class in DEVAPP.VCX. Be sure to Build the application after changing this property.

When the lReleaseLogo property is set to .T., the following behavior is implemented:

·       At application startup, the Application Logo and Copyright Notice are displayed until just prior to the display of the main menu.

·       The Logo check box is removed from the application’s Environment dialog. This prevents application users from turning the Logo display on.

Tip: Some developers prefer this alternative display behavior because clearing the logo and copyright display prior to the display of the Application Toolbar eliminates the downward shift one sees if the logo and copyright are still displayed when the Application Toolbar appears.

lCopyrightNotice

You can choose not to display the Copyright Notice. The lCopyrightNotice property of the application object when .T. (the default) causes the Copyright Notice to be displayed. Set the lCopyrightNotice property to .F. to permanently turn off the Copyright Notice display.

nLogoSeconds

You can change the number of seconds the Logo and Copyright Notice are displayed at application startup when a user has turned off the display on the Environment dialog. The nLogoSeconds property of the application object determines the number of seconds (the default is 4) the Logo and Copyright Notice are displayed. They are not displayed at all if nLogoSeconds is less than or equal to zero.

Application Icon

If you select an Application Icon file on the Logo and Icons dialog, VPM Enterprise will automatically display the icon when your application’s main window is minimized. The Application Icon is also displayed in the upper left-hand corner of the application window. You can use an icon (.ICO) file only.

Ø To select an Application Icon file

1.   Enter the path and name of the icon file in the Application Icon box on the Logo and Icons dialog.

2.   If you don’t know the path and/or name of the icon file, click the ellipsis (…) button to locate the file.

3.   When the icon file path and name are entered and you are finished with the Logo and Icons dialog, click OK.

Form Icon

If you select a Form Icon file on the Logo and Icons dialog, VPM Enterprise will automatically display the icon when a form is minimized. The Form Icon is also displayed in the upper left-hand corner of forms. You can use an icon (.ICO) file only.

Ø To select a Form Icon file

1.   Enter the path and name of the icon file in the Form Icon box on the Logo and Icons dialog.

2.   If you don’t know the path and/or name of the icon file, click the ellipsis (…) button to locate the file.

3.   When the icon file path and name are entered and you are finished with the Logo and Icons dialog, click OK.

Note: The Form Icon you select will be used as the icon for any form that does not have an entry in its Icon property. The VPME Form_ class has a FormIcon method that is called from the Init event of a VPME form. The FormIcon method replaces the form’s Icon property with the name of your FormIcon if the form’s Icon property is blank.

If Your Application Logo or Icons Don’t Display

If the Application Logo graphic, Application Icon or Form Icon that you select on the Logo and Icons dialog does not display when you run your application, here are some things to try:

·       Build the application.

·       Move the graphic and icon files to the project’s home directory.

·       Remove the graphic and icon files from the Visual FoxPro Project Manager. Build the application.

Tip: If you make a change to a graphic or icon file after it has been added to the Project Manager, you will have to remove the file from the Project Manager and Build your application to see the changed file when you run the application.

More:

Project Options