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

ID: 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 listed at the beginning of this article.

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


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE Project in Visual Basic 5.0. Form1 is created by default.


  2. Click OK to dismiss the Project Properties dialog.


  3. Place a CommandButton on Form1.


  4. 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 


  5. Press the F5 key to run the application.


  6. 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 kbWinCE kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: February 25, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.