By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,890 Members | 1,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,890 IT Pros & Developers. It's quick & easy.

Screen resolution w/ 2 monitors

P: n/a
In my program I save the position of the form so the next time the user
logs in and gets to that form it is in the same place. This works great.
But I have run into an issue. Some users have 2 monitors so they slid
the form to the second window. The next time they get to that form it is
in the second monitor (perfect). But, if they were to run the software
from a single monitor machine and get to that form, the form is not
displayed on the monitor because it is wanting to put it on the second
monitor.

What code can I run to see what the resolution of the monitor is, and
how does that resolution handle multiple monitors. In this case, since
this machine only has 1 monitor I want the form to be displayed in the
center for the only monitor and not even try to put it on the
non-existant second monitor.

Thanks.

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Feb 17 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Darin wrote:
In my program I save the position of the form so the next time the
user logs in and gets to that form it is in the same place. This
works great. But I have run into an issue. Some users have 2 monitors
so they slid the form to the second window. The next time they get to
that form it is in the second monitor (perfect). But, if they were to
run the software from a single monitor machine and get to that form,
the form is not displayed on the monitor because it is wanting to put
it on the second monitor.

What code can I run to see what the resolution of the monitor is, and
how does that resolution handle multiple monitors. In this case, since
this machine only has 1 monitor I want the form to be displayed in the
center for the only monitor and not even try to put it on the
non-existant second monitor.


See System.SystemInformation

I suppose you'd compare PrimaryMonitorSize, VirtualScreen and the intended
location of your form.

Andrew
Feb 20 '06 #2

P: n/a
Thanks.

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Feb 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.