BUG: Gauge Custom Control: No Error for Illegal NeedleWidth

Last reviewed: June 21, 1995
Article ID: Q80905
The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows,

  versions 2.0 and 3.0
- Microsoft Professional Toolkit for Microsoft Visual Basic programming
  system for Windows, version 1.0

SYMPTOMS

When you use the Gauge custom control, setting the NeedleWidth property to an invalid value fails to generate an error. Furthermore, attempting to set the NeedleWidth property outside its valid range will reset the NeedleWidth property to 1. This behavior occurs at both design time and run time.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this 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 Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default.

  2. From the File menu, choose Add File (CTRL+F12), and select GAUGE.VBX to add the Gauge control to the Toolbox. The Gauge tool will appear in the Toolbox.

  3. Add the Gauge control to Form1 and set the gauge's Style property to 2 - 'Semi' Needle or 3 - 'Full' Needle.

  4. Add the following code to the Form_Click event procedure.

       Sub Form_Click ()
          Gauge1.NeedleWidth = -3
          MsgBox "NeedleWidth = " + Str$(Gauge1.NeedleWidth)
       End Sub
    
    

  5. From the Run menu, choose Start (ALT, R, S) to run the program.

Notice that clicking the form produces a message box that displays the value of the gauge's NeedleWidth property. Even though the NeedleWidth is explicitly set to -3 before the message box is displayed, the NeedleWidth property resets to a value of 1.


Additional reference words: buglist1.00 buglist2.00 buglist3.00 1.00 2.00
3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus


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: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.