BUG: File Extension Lost if Save As Option is Used in Win95

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

SYMPTOMS

When file extensions are hidden under Microsoft Windows 95, saving a project or file in Visual Basic with the Save As option may cause the file extension to be lost. In this case, Windows 95 loses the ability to recognize the type of the Visual Basic file or even to associate the file with Visual Basic.

RESOLUTION

Either of the following methods can be used to resolve this problem:

In the Windows Explorer, click Options on the View menu. Then uncheck the "Hide MS-DOS file extensions for file types that are registered" option. When this option is used, the display in the Windows Explorer always shows any file extensions, and it also changes the default behavior of the file common dialog boxes. With this option unchecked, the Save As dialog box shows the Visual Basic file extension by default, and all files are saved and associated properly.

- or -

If you would like to keep the behavior offered by this option, you can work around this problem by manually adding the relevant file extension to each file and project you save with the Save As command. You must remember to append the correct extension to every file and project that is saved.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of the article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to reproduce problem

  1. Start Windows Explorer.

  2. On the Windows Explorer's View menu, click Options.

  3. Make sure the "Hide MS-DOS file extensions for file types that are

        registered" option is checked and click OK.
    

  4. Start Visual Basic (32-bit) running under Windows 95.

  5. On the Visual Basic File menu, click Open Project.

  6. Switch to the Samples\CallDLLs subdirectory and open the CallDLLs

        project.
    

  7. On the File menu, click Save File As.

  8. Switch to a different directory and click OK to save the selected form

        from the CallDLLs sample application.
    

  9. In the Windows Explorer, change to and view the directory you just

        saved the form to. A file now exists with the correct name, but it does
        not exhibit the correct icon for a Visual Basic Form file, nor does it
        show the correct Type in its Properties dialog box. Turning off
        the Explorer option and saving the file again fixes the problem (note
        that the old saved file is not deleted and no message appears asking
        if it is OK to overwrite the original file because as far as Windows 95
        is concerned, the two files are completely different entities).
    


Additional reference words: 4.00 buglist4.00 vb432 win95
KBCategory: kbusage kbbuglist
KBSubcategory: EnvtDes


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