General information
Category:
Forms & Form designer
Title:
Calling Code on Form Minimize and Maximize
I need to run code whenever the minimize or maximize button is clicked as well as when the header bar is double-clicked, which also minimizes/maximizes it. Where does the code go?
I was asked to create a test form for testing, and told that it's the resize event.
To test this put a text box on the form and code in RESIZE:
WITH thisform
.text1.Value = STR(.height) + STR(.width)
ENDWITH
I created the test form with the text box and here is what I find:
This does NOT work if
FormWindowState = 0 and
_ScreenWindowState = 2
OR
FormWindowState = 0 and
_ScreenWindowState = 0
It DOES work if
FormWindowState = 2 and
_ScreenWindowState = 0
As a result I have inconsistant behavior...
Primaraly, I'm having problems with resize code when switching between maximize (windowstate=2) and normal (windowstate=0) modes.
I've added resize code in the activate, de-activate, and resize methods, and all I get is this inconsistant behavior...
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