How to get screen width and height?

  • Thread starter Thread starter Guest
  • Start date Start date
Hi Jurate,

Screen.GetBounds() might help you out. I'm not sure if you will get the
entire virtual desktop on multi-screen systems, but in that case maybe
Screen.PrimaryScreen.GetBounds() will work.
 
Jurate,

In addition to the above replies, if your application may be used on
multi-screen machines, you need to carefully consider any window sizing &
positioning etc that you do using screen bounds.

Consider whether you are moving windows or opening dialog boxes on a screen
other than the one which the user has positioned your application on (which
may not be the Primary screen). Try to avoid this if at all possible.

You can use Screen.AllScreens to get a list of all screens on the system.
You can then determine the bounds of each individual screen from the Bounds
property.

HTH,
Chris.
 
Sorry for the delay.

I suspect you need to check the bounds of the window in question against the
Bounds or WorkingArea of each screen. Bear in mind that a window may be split
across more than one screen.

Cheers,
Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top