The information in this article applies to:
SYMPTOMS
If you use a WIDTH statement to change the screen resolution in a
Form_Load event procedure, the WIDTH will not take affect until after
the Form_Load event procedure has finished.
STATUSMicrosoft has confirmed this to be a bug in Microsoft Visual Basic for MS-DOS, version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONSteps to Reproduce Problem
This is because the assignment of the Height property of the form was done in the Form_Load event. The setting by the WIDTH statement has not yet been processed, so you are trying to set the Height of the form to 40 lines while still in 25-line mode. This results in the form Height being set to a maximum value of 25 lines. When the Form_Load event procedure ends, the WIDTH setting is processed and set, so you now get the 43 line mode display, but the form is still only 25 lines in height. To work around this problem, you can add a SHOW statement just after the WIDTH statement. This will force the form to be shown, then the rest of the code in the Form_Load event will be executed. As a result, the WIDTH statement is processed and the form is displayed in 43 line mode; when the Height is set to 40, it is within the maximum value of 43 for 43-line mode. For more information about how form height is limited to screen resolution, query on the following words in the Microsoft Knowledge Base: form and height and width and screen Additional query words: VBmsdos buglist1.00 1.00
Keywords : |
Last Reviewed: December 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |