Detecting the default Windows screen res.

M

Mufasa

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.
 
M

Mark Salsbery [MVP]

Mufasa said:
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/library/aa394512(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa394122(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa388669(VS.85).aspx


Mark
 
G

G.S.

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/lib...rosoft.com/en-us/library/aa388669(VS.85).aspx

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++






- 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/library/ms812142.aspx#detectscreenorient_topic2
 
T

TAB

Mufasa said:
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.
 

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