ID Number: Q74446
1.00
WINDOWS
buglist1.00
Summary:
In the Properties list box, setting the WindowState property of a
form to either "1 - Minimized" or "2 - Maximized" at design time
incorrectly displays "0 - Normal" after you run the program. When you
run the application again, your last WindowState setting (1 or 2) is
correctly remembered, even though the Properties list box incorrectly
displays "0 - Normal". However, if you save the project, the value for
the WindowState property (1 or 2) will be forgotten, and will
incorrectly return to "0 - Normal".
Microsoft has confirmed this to be a problem in Microsoft Visual Basic
programming system version 1.0 for Windows. We are researching the
problem and will post new information here as it becomes available.
More Information:
Steps to Reproduce Problem
--------------------------
1. In the Properties list box, change the WindowState property of a
form to "1 - Minimized" or "2 - Maximized".
2. From the Run menu, choose Start.
3. From the Run menu, choose End. Notice that the WindowState property
in the Properties list box incorrectly displays "0 - Normal".
4. When you run the program again, the Form1 will correctly be
minimized (1) or maximized (2), showing that the value for
WindowState is remembered.
5. If you save the project and run again, the value set for the
WindowState property is incorrectly reset to "0 - Normal".
To work around this problem, you can set the WindowState property in
the Form_Load event procedure (instead of setting WindowState in the
Properties list box at design time). If you place the following line
of code in the Form_Load event procedure, the application will always
start up maximized:
WindowState = 2 ' 0=normal window; 1=minimized; 2=maximized
Additional reference words: 1.00