Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Code on Form Minimize and Maximize
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Calling Code on Form Minimize and Maximize
Miscellaneous
Thread ID:
01271023
Message ID:
01271023
Views:
64
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
Map
View

Click here to load this message in the networking platform