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

Detecting the default Windows screen res.

P: n/a
I have customers who install our product and then set the screen resolution
to a crappy resolution so things don't display on the screen correctly. I'd
like to know what the default monitor setting is set to. I'd also like to
know what windows has detected as the default screen res.

I'd also like to find out information about what monitor is hooked up to the
computer. I realize this isn't always right but I'd like to know what
windows is reporting.

TIA - Jeff.

Aug 26 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Mufasa" <jb@nowhere.comwrote in message
news:#0**************@TK2MSFTNGP03.phx.gbl...
I have customers who install our product and then set the screen
resolution to a crappy resolution so things don't display on the screen
correctly. I'd like to know what the default monitor setting is set to.
I'd also like to know what windows has detected as the default screen res.

I'd also like to find out information about what monitor is hooked up to
the computer. I realize this isn't always right but I'd like to know what
windows is reporting.

I'm not sure about getting default settings, but the Win32_VideoController,
Win32_DesktopMonitor, and CIM_VideoControllerResolution WMI classes have all
kinds of info.

http://msdn.microsoft.com/en-us/libr...12(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...22(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...69(VS.85).aspx
Mark

--
Mark Salsbery
Microsoft MVP - Visual C++

>
TIA - Jeff.
Aug 26 '08 #2

P: n/a
On Aug 26, 1:24*pm, "Mark Salsbery [MVP]"
<MarkSalsbery[MVP]@newsgroup.nospamwrote:
"Mufasa" <j...@nowhere.comwrote in message

news:#0**************@TK2MSFTNGP03.phx.gbl...
I have customers who install our product and then set the screen
resolution to a crappy resolution so things don't display on the screen
correctly. I'd like to know what the default monitor setting is set to.
I'd also like to know what windows has detected as the default screen res.
I'd also like to find out information about what monitor is hooked up to
the computer. I realize this isn't always right but I'd like to know what
windows is reporting.

I'm not sure about getting default settings, but the Win32_VideoController,
Win32_DesktopMonitor, and CIM_VideoControllerResolution WMI classes have all
kinds of info.

http://msdn.microsoft.com/en-us/libr...69(VS.85).aspx

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++


TIA - Jeff.- Hide quoted text -

- Show quoted text -
I once needed to detect screen orientation...
Search for this string Screen.PrimaryScreen.Bounds.Height
on the following page:
http://msdn.microsoft.com/en-us/libr...norient_topic2
Aug 26 '08 #3

P: n/a
TAB

"Mufasa" <jb@nowhere.comskrev i meddelandet
news:#0**************@TK2MSFTNGP03.phx.gbl...
I have customers who install our product and then set the screen
resolution to a crappy resolution so things don't display on the screen
correctly. I'd like to know what the default monitor setting is set to.
I'd also like to know what windows has detected as the default screen res.

I'd also like to find out information about what monitor is hooked up to
the computer. I realize this isn't always right but I'd like to know what
windows is reporting.

TIA - Jeff.
Hi

I have used
int screenWidth = SystemInformation.PrimaryMonitorSize;

That will give you the current width and height .
Have a look other SystemInformation properties, like MonitorCount and
others.

Aug 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.