Unable to Move or Size Form After Executing Width Statement

ID: Q94787


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for MS-DOS, version 1.0


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

  1. Start VBDOS.EXE.


  2. From the File menu, choose New Form. Form1 is created by default.


  3. From the File menu, choose Exit, and save all changes.


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


  5. Run the program.


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 :
Version : MS-DOS:1.0
Platform : MS-DOS
Issue type :


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