Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pickup _screen windowstate change?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00085679
Message ID:
00085725
Views:
27
>>>I want to reposition forms from top/left to center based on whether _screen is normal or maximized. Is there a (hopefully easy) way to do this?
>>
>>Bruce,
>>
>>Here's a way:
>>
>>DECLARE SHORT IsZoomed IN Win32API;
>> INTEGER hWnd
>>* Get the window handle from Foxtools
>>* or FindWindow (e.g lnhWnd = MainhWnd())
>>* If the _SCREEN is maximized IsZoomed will
>>* return a non-zero value
>>llismax = (IsZoomed(lnhWnd) # 0)
>
>Thanks, George...I'm not quite sure how to implement it, though, that is, where to "catch" it in vfp events. Any ideas?

Well, if you're trying to center a child form, you might try "catching" in in the form's Paint method. That fires 70 times a second.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform