Microsoft KB Archive/94787

= Unable to Move or Size Form After Executing Width Statement =

PSS ID Number: 94787

Article Last Modified on 1/8/2003

-

The information in this article applies to:


 * Microsoft Visual Basic for MS-DOS 1.0

-



This article was previously published under Q94787



SYMPTOMS
Trying to move or size a form after changing the screen height by using the Width statement can limit the maximum size of the form under the following conditions:
 * The screen height is changed, using the Width statement, to a larger value than it was when the program started.
 * The form is moved or sized before the form is shown.



WORKAROUND
To work around this problem, show the form before sizing or moving it.



STATUS
Microsoft has confirmed this to be a bug in the Standard and Professional Editions of Microsoft Visual Basic version 1.0 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
The following example requires that you have a video card that supports a screen height of 43 in text mode. Before starting VBDOS.EXE make sure your video is set to a screen height of 25 by using the following MS-DOS command: MODE ,25

Steps to Reproduce Problem
 Start VBDOS.EXE. From the File menu, choose New Form. Form1 is created by default. From the File menu, choose Exit, and save all changes.  Add the following code to the Form_Load event procedure: Sub Form_Load Width, 43 ' This sets screen height to 43 Form1.Top = 0 Form1.Height = 43 End Sub  Run the program.</ol>

Notice that the height of the form is only 25 even though it was set to 43. If you put Form1.Show in the example code before setting the Top property, the form comes up correctly and the height of the form is set to 43.

Additional query words: VBmsdos buglist1.00 1.00

Keywords: KB94787

Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3

-

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

© 2004 Microsoft Corporation. All rights reserved.