PRB: Long Filenames Lost when Project is Loaded by Association

Last reviewed: May 23, 1996
Article ID: Q149863
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 32-bit only, for Windows, version 4.0

SUMMARY

Visual Basic for Windows 4.0 32-bit project long filenames are converted to short filenames when run by association under Microsoft Windows 95 or Microsoft Windows NT. Running by association is invoked by double-clicking on a file in Windows Explorer or Windows File Manager.

STATUS

This behavior is by design.

MORE INFORMATION

If the fully qualified path to vb32.exe contains any long filenames (for example: C:\Files\Microsoft Visual Basic\Vb32.exe) when a project is loaded by association from Windows Explorer or Windows File Manager, Visual Basic 4.0 uses the short filename to load the project. The short filename appears on the Visual Basic 4.0 design environment title bar. In addition, using the File/"Make EXE" option on a Windows 95 machine, the .Exe file uses the short filename as well.

WORKAROUND

For Windows Explorer

  1. From the Explorer View/Options dialog box, select the FileTypes tab. In the Registered File Types list box, select Visual Basic Project, and click on the Edit button. In the Actions list box of the Edit File Type dialog box, select open, then click the Edit button. In the Application used to perform action field, put quotation marks (" ") around the path to Vb32.exe as follows:

    "C:\Program Files\Microsoft Visual Basic\Vb32.exe" "%1"

  2. Click the OK button to save the change.

  3. Modify the Make EXE File and Run Program selections in the Actions list box in the same way as the edit selection in step 1.

Visual Basic now loads/makes/runs the project using its correct long filename.

For Windows File Manager

  1. From File Manager, select a Visual Basic 4.0 32-bit Visual Basic Program file, and select the File/Associate option. Select Change Type. Edit the Command field, placing quotation marks (" ") around the path to Vb32.exe, as follows:

          "C:\Program Files\Microsoft Visual Basic\Vb32.exe" "%1"
    

  2. Click OK to save the change.

Now Visual Basic 32 loads the project using its correct long filename.


Additional reference words: 4.00 vb4win vb432
KBCategory: kbusage kbhowto kbprb
KBSubcategory: EnvtRun



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: May 23, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.