INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Multi Monitor VFP

Multi Monitor VFP

(OP)
Hi All,
I use multiple monitors in my setup (4 in total), which probably many of you do as well. But in my application I allow users to change screen size (workspace size) through a few different controls (they can enter height and width as custom values like 1200 x 1200 or 1980 x 1000, and also through a drop down that has common fixed sizes like 1920 x 1080, 2048 x 1600, etc). I also have a control that lets them decide to center the screen. This is where the problem comes in. If that box is checked, but they are not on the "primary monitor" according to Windows, then the form centers to the screen in the "primary monitor", not the monitor the application is running in. Is there a way to determine 1) If there is more than one monitor 2) what monitor the application is currently running in, and 3 what the resolution of any given monitor is (not all have to be the same). When I travel, I have a 2 monitor setup, my laptop has a big resolution like 2610 x 1600 (something weird), but my travel monitor is 1920 x 1080 (and that's where I run the application), so if different sizes behave different ways I want to be able to "get" the size before deciding how to handle things like centering, and primary monitor, or monitor application is running in.
Anyone faced this?

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

RE: Multi Monitor VFP

(OP)
Thanks Mike, this was awesome and just what I was looking for.
The SYSMETRIC() is a function I didn't know about, but his use of the WinAPI to manage the other aspects is critical.
Cheers!

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close