Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Top Level Form and Menu Adjustment
Message
From
16/11/2001 13:23:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
16/11/2001 12:43:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00582780
Message ID:
00582839
Views:
21
>>>I have a small Top Level form with a menu instantiated in it. I have noted that if a user sets the font size for menus in Control Panel large enough, it will cause the menu bar to wrap on the form and push all controls down on the form the height of a menu bar.
>>>
>>>I can handle this issue on startup in the Activate event by testing and modifying the form's height as necessary. But if the user changes the Control Panel setting while the application is active this does not work. Apparently in Top Level forms the Activate and GotFocus events do not fire after the form is active when switching between it and another running Windows application. If the Activate event fired I could test here when the user clicks on the form and make the adjustment. Paint event does not seem to be appropriate for this condition either, besides, I don't really like to use the Paint event unless it's really necessary...fires too often.
>>>
>>>What would be a strategy for resolving this issue?
>>>
>>>Thanks,
>>>Bill
>>
>>Bill,
>>GetActiveWindow API ?
>>Cetin
>
>Um, what am I going to do with the handle when I get it?

Bill,
I tried it and works nice (I think). A timer fires (interval 1000) :

thisform.text1.value = iif(GetActiveWindow() > 0, ;
'Active','NonActive')+trans(datetime())

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform