469,336 Members | 5,552 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

Get and Set screen resolution

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
Nov 21 '05 #1
4 21800
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
Nov 21 '05 #2
Bill,

Here a link I saw that was provided in a message by Terry in this newsgroup.

http://www.omniscium.com/index.asp?p...reenResolution

I hope this helps,

Cor
Nov 21 '05 #3
"Bill Nguyen" <bi*****************@jaco.com> schrieb:
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>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4
"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:u%****************@tk2msftngp13.phx.gbl...
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.
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by ZaGras | last post: by
5 posts views Thread by Chris | last post: by
1 post views Thread by fabrice | last post: by
6 posts views Thread by Darian | last post: by
7 posts views Thread by tim | last post: by
5 posts views Thread by Maxi | last post: by
9 posts views Thread by Steve Wright | last post: by
7 posts views Thread by Peter Oliphant | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.