Microsoft KB Archive/149863

= PRB: Long Filenames Lost when Project is Loaded by Association =

Article ID: 149863

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Control Creation Edition
 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q149863



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



CAUSE
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 uses the short filename to load the project. The short filename appears on the Visual Basic design environment title bar. In addition, using the File/"Make EXE" option on a Windows 95, Windows 98, or Windows Me machine, the .Exe file uses the short filename as well.



For Windows Explorer
 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"

 Click OK to save the change. 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
 From File Manager, select a Visual Basic 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"

 Click OK to save the change.</li></ol>

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

<div class="status_section">

STATUS
This behavior is by design.

Additional query words: EnvtRun

Keywords: kbprb KB149863

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.