Microsoft KB Archive/180757

{|
 * width="100%"|

FIX: Form.ScaleHeight and Form.ScaleWidth Do Not Function

 * }

Q180757

-

The information in this article applies to:


 * Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0

-

SYMPTOMS
Changing the ScaleWidth and ScaleHeight properties of a Form does not affect the position of graphical renderings that are drawn with graphical methods such as DrawCircle and DrawLine.

RESOLUTION
Where possible, use a PictureBox instead of a form to display graphics drawn using the DrawCircle and DrawLine methods.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products that are listed at the beginning of this article.

This problem was corrected in Windows CE Toolkit for Visula Basic 6.0.

Steps to Reproduce Behavior
 Create a new Windows CE Project in Visual Basic 5.0. Form1 is created by default. Click OK to dismiss the Project Properties dialog. Place a CommandButton on Form1.  Add the following code to Form1:

  Private Sub Command1_Click Form1.ScaleHeight = Form1.ScaleHeight + 100 ' Set height units. Form1.ScaleWidth = Form1.ScaleWidth + 100  ' Set width units. Form1.DrawCircle 500, 500, 250             ' Draw circle. Form1.DrawLine 0, 0, 1000, 4000            ' Draw line. End Sub  Press the F5 key to run the application. Click on the CommandButton several times and note that these properties do not affect the position of the circle or the line.

Additional query words: vbce vbce5 vbce6

Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbOSWinCEsearch kbGrpDSVB

Issue type : kbbug

Technology : kbVBSearch kbAudDeveloper kbWinCETKVBSearch kbWinCESearch kbWinCETK100VB500