How to Add Custom Label Sizes to Visual FoxProID: Q128651 The information in this article applies to:
SUMMARYIn earlier versions of FoxPro, it was difficult to add a custom label size. Although Visual FoxPro ships with the most common styles of Avery labels, it may still be necessary to add your own custom label size. This article shows you how.
MORE INFORMATIONWith Visual FoxPro, it's easy to add a new, custom label size to your application. The following steps, taken from the online Help, outline this process. If you don't see a label size that you need in the Label Designer, you can add label sizes to the New Label dialog box by adding new sizes to the resource file that populates the dialog box. The name of the resource file box is stored in the configuration file. By default, the configuration file is CONFIG.FPW. To add a label size: 1. From the Program menu, choose Do. 2. From the Visual FoxPro directory, select ADDLABEL.APP. 3. In the box, enter the path and name for the resource file.
4. In the Add Label dialog box, select Create New Label Layout.
5. In the Create New Label Layout dialog box, enter the information 6. Choose Add This Layout. Visual FoxPro adds the new label to the resource
7. If you want to add another label size, choose Create New Label Layout.
In addition to the foregoing information from the help file, the following
are some items you should be aware of about labels.
Existing Labels in Resource FileVisual FoxPro doesn't check to see if label definitions already exist in the current resource file. Consequently, pressing the 'Add Labels to Resource File' button repeatedly will add the same 86 present label definitions to the resource file. When you go to select a label layout, you will see each definition repeated however many times you pressed the button. The easiest way to recover from this is to delete your resource file, but if this is not feasible, you will need to issue a SET RESOURCE OFF, use the resource file, and then manually delete the unwanted label entries.
Adding a LabelThe following information documents some of the points to remember when creating a new label layout.
In the event that your resource file ever becomes corrupt, you can recover by reruning the ADDLABEL.APP program to add back in the standard and custom label definitions. After you finish adding labels, choose the Cancel button from the Add Label dialog box.
Distributing Labels with Your ApplicationBecause label layouts are stored in your resource file, you must also distribute the resource file with your application so your users have access to the standard and custom label definitions. Additional reference words: 3.00 VFoxWin Labels Custom LWriter KBCategory: kbtool kbprg kbprint KBSubcategory: FxtoolRwriter
|
Last Reviewed: July 23, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |