Microsoft KB Archive/80905

= BUG: Gauge Custom Control: No Error for Illegal NeedleWidth =

Article ID: 80905

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Windows 2000 Readiness Analyzer

-



This article was previously published under Q80905



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.



Steps to Reproduce Problem
 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), and select GAUGE.VBX to add the Gauge control to the Toolbox. The Gauge tool will appear in the Toolbox. Add the Gauge control to Form1 and set the gauge's Style property to 2 - 'Semi' Needle or 3 - 'Full' Needle.  Add the following code to the Form_Click event procedure. Sub Form_Click Gauge1.NeedleWidth = -3 MsgBox &quot;NeedleWidth = &quot; + Str$(Gauge1.NeedleWidth) End Sub  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 query words: buglist1.00 buglist2.00 buglist3.00 1.00 2.00 3.00

Keywords: kbbug KB80905

-

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

© Microsoft Corporation. All rights reserved.