Get and Set screen resolution

B

Bill Nguyen

My VB.Net app requires a minimum monitor resolution of 1024 x 768.
How to get user's screen resolution and set it to the minimum at runtime?
Thanks


Bill
 
F

Frank Eller

Hi Bill,
My VB.Net app requires a minimum monitor resolution of 1024 x 768.
How to get user's screen resolution and set it to the minimum at
runtime? Thanks

You can get the screen resolution with

Screen.PrimaryScreen.Bounds ...

To change the screen resolution you need Windows API. But you shouldn't do
it, the resolution of the screen is something you should never touch.

Regards,

Frank Eller
www.frankeller.de
 
H

Herfried K. Wagner [MVP]

Bill Nguyen said:
My VB.Net app requires a minimum monitor resolution of 1024 x 768.
How to get user's screen resolution and set it to the minimum at runtime?

Monitor size:

'SystemInformation.PrimaryMonitorSize'
'SystemInformation.WorkingArea'
'SystemInformation.VirtualScreen'
'Screen.PrimaryScreen.Bounds'
'Screen.PrimaryScreen.WorkingArea'

When using multiple monitors:

'Screen.AllScreens'


Changing the screen resolution
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=setscreenresolution&lang=en>
 
P

Phill. W

Bill Nguyen said:
My VB.Net app requires a minimum monitor resolution of 1024 x 768.

That's rather forward of you. Personally, I'd be asking

"What is the minimum monitor resolution [likely to be] used by
my user community?"
How to ... set it to the minimum at runtime?

You don't, even if you could assume that every monitor running
your application could [properly] support the resolution you want.

Users choose their screen resolution based on their physical
requirements (or esoteric leanings or just plain bl**y-minded
awkwardness); your applications, PITA though it may be,
should honour this.

Regards,
Phill W.
 

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

Top