General information
Category:
Forms & Form designer
Title:
Can't restoring minimized window - Is it bug?
Dear All!
Please confirm this strange VFP behaviour:
if a top-level window is minimized by the taskbar "Show/hide desktop" button, then it is impossible to restore the form to its original size and position programatically. Instead the form will be displayed as a very small "Titlebar only" window.
Important: it is reproduceable in the case only, if you follow these steps. Other way, like clicking on the Min button, you cannot reproduce this bug.
Steps to reproduce:
1. Create a new form. Set ShowWindow to 2 (As Top-level) and Autocenter to .T.
2. Put a disabled timer on it, with 5000ms interval. Let the name of it: ShowAgainTimer
The timer event contains the following:
this.enabled=.F.
if thisform.WindowState=1
thisform.WindowState=0
endif
3. Put into the form Resize event the followings:
if thisform.WindowState=1
thisform.ShowAgainTimer.enabled=.T.
endif
4. Save the form, and run it. The form willbe shown up in the center of the desktop.
5. Click on the taskbar "Show/hide desktop" button. Notice that all window will be minimezed into the taskbar.
(The test form's timer will be fired in 5sec and it will try to restore the vfp form)
But the VFP form wil not be restored to its original size and position, instead it will be shown as a very smallsized window on the left upper corner of the Windows desktop.
I have checked on VFP6 and VFP8.
(The credit for discovering this strange bug/feature goes to Mr Curt Burdick.)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only