FIX: Gauge: Incomplete Paint with Max-Min Difference > 100

Last reviewed: October 30, 1997
Article ID: Q81462
1.00 2.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows, version 2.0 - Microsoft Professional Toolkit for Microsoft Visual Basic programming

  system for Windows, version 1.0

SYMPTOMS

When you use the Gauge custom control, a linear gauge (Style 0) will fail to fill the leftmost column of pixels in the fill area whenever Gauge1.Max - Gauge1.Min is greater than 100. Similarly, the bottom-most row of pixels in the fill area of the horizontal gauge will not be filled given the same condition. The column or row of pixels not filled are cleared to the BackGround color because the inner area is cleared using the BackGround color whenever the Gauge's fill area is updated.

STATUS

Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem in Visual Basic Version 1.0

1. Start Visual Basic or from the File menu, choose New Project (ALT, F, N)
   if Visual Basic is already running. Form1 is created by default.

  • From the File menu, choose Add File (CTRL+F12). In the Files box, select the GAUGE.VBX custom control file. The Gauge tool will appear in the Toolbox.

  • Add the Gauge control to Form1, and set the Gauge's properties to the following:

       Properties   Value
       -------------------------------------
    
       BackColor    &H00000000& (Black)
       ForeColor    &H00C00C00& (Light Gray)
       Max          101
       Picture      "SPEEDO.BMP"
    
       Note that the SPEEDO.BMP is not available in Visual Basic version 2.0.
    
    

  • Add the following code to the Gauge_Click event procedure.

       Sub Gauge1_Click ()
          For i=Gauge1.Min to Gauge1.Max
             Gauge1.Value = i
          Next i
       End Sub
    
    

  • From the Run menu, choose Start (ALT, F, N) to run the program.

    Note that when you click the Gauge control, there is a black vertical line in the leftmost part of the inner area that isn't filled.


  • Additional reference words: buglist1.00 buglist2.00 fixlist3.00 1.00 2.00
    3.00
    KBCategory: kbprg kbbuglist
    KBSubcategory: PrgCtrlsCus
    Solution Type : kbfix


    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: October 30, 1997
    © 1998 Microsoft Corporation. All rights reserved. Terms of Use.