Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Size Of Taskbar
Message
From
08/02/2013 21:24:43
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01565598
Message ID:
01565606
Views:
79
>I want to resize the height of ny form dependant on the height that's available on
>the current screen resolution. On a machine that has Windows 7 I want to reduce
>the height of my form by the height of the Task bar (if it's visible).
>Is this possible in Windows 7?
>Thanks in advance


It's possible. I've done this before. I had to find the window by name, and then get its coordinates using Win32 functions. Once that information was obtained, it became relatively straight-forward to modify the size of the form to fit the screen. Some issues arose with multiple monitors. The algorithm wound up being kind of hefty to accommodate all the variables.

It might be easier to maximize the window and note the left, top, width and height values, and compare them to the native desktop size to determine if the taskbar is visible or not (again, sometimes a tricky issue with multiple monitors). The rectangular portion that your window doesn't occupy will be the part that's the taskbar.

HTH! :-)

This function MonitorFromWindow() might help: http://msdn.microsoft.com/en-us/library/windows/desktop/dd145064%28v=vs.85%29.aspx
Previous
Reply
Map
View

Click here to load this message in the networking platform