Microsoft KB Archive/150181

= BUG: Spin Control Does Not Obey Move Method =

Article ID: 150181

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q150181



SYMPTOMS
When you use the Move method of the Spin control, the control may not move if it is invisible.



STATUS
Microsoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article.



WORKAROUND
To work around this problem, issue the Move command twice. For example, instead of writing: SpinButton1.Move 0,0,200,200 use the following code to move the control if it is invisible: SpinButton1.Move 0,0,200,200 SpinButton1.Move 0,0,200,200 If the size of the control remains unchanged, the command only needs to be issued once.

Steps To Reproduce Problem
 Start a new project. Form1 is created by default. Place an OutRider SpinButton control on the form. From the Tools menu, select the Custom Controls menu option, and then select the Outrider SpinButton.  In the Form_Click event, place the following code: Private Sub Form_Click

SpinButton1.Visible = False

SpinButton1.Move 0, 0, 200, 200

SpinButton1.Visible = True

End Sub 

Run the program by pressing F5, and notice that the control re-sizes but does not move to the upper left hand corner of the client area of the Form.



MORE INFORMATION
In general, this problem is encountered when the size and the position of the control are adjusted. If the size of the control is not adjusted by the Move command, the control will move correctly.

Keywords: kbbug KB150181

-

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

© Microsoft Corporation. All rights reserved.