HOWTO: Customizing the Comment and Uncomment Strings in VFP

Last reviewed: March 24, 1997
Article ID: Q165640
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a

SUMMARY

This article shows how you can add a custom Comment and Uncomment string in Visual FoxPro 5.x. The default Comment sting is *!*. To place a Comment string in a text file, open the text file, right-click, and choose Comment.

MORE INFORMATION

Currently there is no way to customize the Comment and Uncomment string in Visual FoxPro 5.0 other than doing it through the registry setting. As always, be careful when working in the registry. The registry entry that is needed to customize the Comment and Uncomment string is called "EditorCommentString" and must be located in the HKEY_CURRENT_USER\Software\Microsoft\Visual FoxPro\5.0\Options.

The following steps show you how you set up your own customize Comment and Uncomment string:

In Windows 95 and Windows NT 4.0

  1. Run the registry (Regedit.exe) editor.

  2. Click the HKEY_CURRENT_USER key and navigate down the tree until you reach the \Options key.

  3. From the Edit menu pad, click New and select String Value from the registry editor menu, and type in the new key as "EditorCommentString' (without the quotes).

  4. From the Edit menu, click Modify, or double-click the key and specify the following value in the Edit String window including the asterisk:

          * NOTE *
    

  5. Click OK in the Edit String window, then choose the Registry menu pad and Exit to quit.

In Windows NT 3.51

  1. Run the registry (Regedt32.exe) editor.

  2. Choose the HKEY_CURRENT_USER window and navigate down the tree until you reach the \Options key.

  3. Click the Edit menu and click Add Value from the registry editor menu, specify "EditorCommentString" (without the quotes) as the Value Name and leave the default data type of REG_SZ.

  4. When you click OK, another window appears in which you can specify your customize comment string, such as the following (including the asterisk):

          * NOTE *
    

  5. Click the Registry menu and select Exit to quit.

NOTE: Be sure to Restart Visual FoxPro in order for the changes to take effect. To restore the default setting of *!*, delete the "EditorCommentString" key.


Keywords : FxtoolGeneral kbtool vfoxwin
Version : 5.0 5.0a
Platform : WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.