Is there any way to get the monitor native resolution.?

G

Guest

Hi,

I need to get the the display monitor native resolution.I have tried
SystemInformation.PrimaryMonitorSize. it is giving the exisiting resolution
of the display monitor that is connected.
Please help me out to find the way to get the native resolution of the
monitor that is connected

-BMK
 
C

Christian Blackburn

Hi BMK,

Are you trying to find out the maximum resolution supported by your
monitor?

Thanks,
Christian
 
G

Göran Andersson

BMK said:
Hi,

I need to get the the display monitor native resolution.I have tried
SystemInformation.PrimaryMonitorSize. it is giving the exisiting resolution
of the display monitor that is connected.
Please help me out to find the way to get the native resolution of the
monitor that is connected

-BMK

Some monitors have a native resolution, some don't.

If it's an LCD monitor, the native resolution is the highest resolution
that it supports.

If it's a CRT monitor, it doesn't have a native resolution.
 
G

Guest

Hi Christian,

For some monitors maximum resolution is different from native resolution.
is there any way to get maximum resolution supported by a monitor.?

-BMK
 
M

Michel Walsh

DirectX9 seems an overkill, but does the enumeration of the supported modes
quite nicely:

foreach( AdapterInformation ai in Manager.Adapters)
{
// ai.CurrentDisplayMode.Width,
// ai.CurrentDisplayMode.Height,
// ai.CurrentDisplayMode.Format

foreach( DisplayMode dm in ai.SupportedModes)
{
// dm.Width,
// dm.Height,
// dm.Format (RGB)
}
}


Note that it only pumps out modes supported by DirectX. Some old graphic
cards, are example, support 24 bits - R8G8B8, but DirectX does NOT support
that mode, so it won't be listed.

If you use generic driver for the monitor, some mode may not work properly
(so the standard button to click within few seconds when you dynamically
change of resolution).

If you have two adapters, both are reported.

I am not aware of a 'native' mode. Do you mean 'actual', if so, use the
CurrentDisplayMode rather than using the innermost enumeration.



Vanderghast, Access MVP
 
B

Ben Voigt [C++ MVP]

I am not aware of a 'native' mode. Do you mean 'actual', if so, use
the CurrentDisplayMode rather than using the innermost enumeration.

LCDs have a native display resolution -- the actual number of crystals
physically comprising the screen. Switching to any other resolution forces
the display to continually stretch/resample to the native resolution,
resulting in blurriness.
 

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