FIX: Form Icon Displayed as Compressed on True Color Display

ID: Q223126


The information in this article applies to:
  • Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0
    on the following platforms: NT


SYMPTOMS

When running Visual Basic on a system using Windows NT 4.0 Service Pack 3 or 4 with the video mode set to the True Color display, a compressed 32x32 version of the icon appears in the Title bar of the form despite the fact that the icon file contains a 16x16 version of the icon. Assuming that the icon file contains both a 32x32 and 16x16 version of the icon, Visual Basic should display the 16x16 version.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3.

For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed


MORE INFORMATION

This section illustrates how to create a sample project that demonstrates the bug behavior. It assumes that you are running Visual Basic on a system using Windows NT 4.0 with Service Pack 3 or 4. The display setting of this system must be set to True Color. The section also assumes you have an icon file with a 32x32 version and a 16x16 version of the icon.

Steps to Reproduce Behavior

  1. Start a new Visual Basic Standard EXE project. Form1 is created by default.


  2. Set the Icon property of Form1 to the icon file.

    A compressed version of the 32x32 icon appears in the Title bar of Form1. The expected behavior is the 16x16 version of the icon appears in the Title bar.



REFERENCES

For more information on how the Windows operating systems uses icons, please see: ImageList Control in the MSDN Web site at:

http://msdn.microsoft.com/library/techart/msdn_icons.htm

Another approach to this problem is provided in the following publication:

Peterson, Karl E. "Ask the VB Pro" Visual Basic Programmer's Journal April, 1999. Fawcette Technical Publications

Additional query words:

Keywords : kbIcon kbVBp600bug kbNTOS400sp3 kbNTOS400sp4 kbGrpVB kbVS600sp3fix
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: May 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.