get native resolution of LCD display
-
hallo is it possible to fetch the actual native resolution or the resolution ratio of a LCD display attached to the system? Eg.: i'd want my application to adapt differently if the LCD display is a 4:3 or a 16:9, etc., independently from the Windows' resolution Thanks!
-
hallo is it possible to fetch the actual native resolution or the resolution ratio of a LCD display attached to the system? Eg.: i'd want my application to adapt differently if the LCD display is a 4:3 or a 16:9, etc., independently from the Windows' resolution Thanks!
-
You could use
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Size
.The need to optimize rises from a bad design.My articles[^]
That will get the bounds of the screen at its current resolution...but will it get the bounds of the screen at its native resolution? For example, if I have a 1920x1080 screen, but I am running it at 1600x1200...the ratio of 1600x1200 is a 4:3 ratio, but the screen itself is a 16:9 ratio. There is also the question of a screen with 1920x1200/2560x1600, which are both 16:10. I am not sure the .Bounds property will actually provide the right information.
-
That will get the bounds of the screen at its current resolution...but will it get the bounds of the screen at its native resolution? For example, if I have a 1920x1080 screen, but I am running it at 1600x1200...the ratio of 1600x1200 is a 4:3 ratio, but the screen itself is a 16:9 ratio. There is also the question of a screen with 1920x1200/2560x1600, which are both 16:10. I am not sure the .Bounds property will actually provide the right information.
You're right, it seems that Bounds returns current resolution. If the client is Vista, then the maximum sizes should be found using WMI (http://msdn.microsoft.com/en-us/library/aa394535(VS.85).aspx[^]) but I'm not sure if older Windows versions have anything similar.
The need to optimize rises from a bad design.My articles[^]
-
You could use
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Size
.The need to optimize rises from a bad design.My articles[^]
Thanks for the reply, but the method returns the Windows resolution. I'm looking for the *real* *physical* *native* resolution of the LCD display, the number of real pixels that the display is made of. Eg. i need to know if the display is a 1280x800 or a 1280x1024, independently from the screen resolution currently setted in Windows. I think that it is possible to read that value, since Windows itself can: actually, it does so the very first time you attach a different LCD display and Windows (XP) says "the screen now will be adjusted for a better visualization".
-
Thanks for the reply, but the method returns the Windows resolution. I'm looking for the *real* *physical* *native* resolution of the LCD display, the number of real pixels that the display is made of. Eg. i need to know if the display is a 1280x800 or a 1280x1024, independently from the screen resolution currently setted in Windows. I think that it is possible to read that value, since Windows itself can: actually, it does so the very first time you attach a different LCD display and Windows (XP) says "the screen now will be adjusted for a better visualization".
I'm not sure about it but I think that earlier Windows versions may not see the native resolution. The display driver used sees it, but that wold be driver specific. However did you notice the post I replied to Jon Rista? Vista has a new WMI class definition to get the maximum sizes.
The need to optimize rises from a bad design.My articles[^]
-
hallo is it possible to fetch the actual native resolution or the resolution ratio of a LCD display attached to the system? Eg.: i'd want my application to adapt differently if the LCD display is a 4:3 or a 16:9, etc., independently from the Windows' resolution Thanks!
-
hallo is it possible to fetch the actual native resolution or the resolution ratio of a LCD display attached to the system? Eg.: i'd want my application to adapt differently if the LCD display is a 4:3 or a 16:9, etc., independently from the Windows' resolution Thanks!
Why would you want it to adapt to the screen and not the resolution? It will look stretched/smashed if you try to do that...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
-
Why would you want it to adapt to the screen and not the resolution? It will look stretched/smashed if you try to do that...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
This is the interesting point :) The user will not have access to Windows settings (mandatory design). If he would attach a non-4:3 LCD to the machine, and Windows shouldn't adapt automatically to the native resolution, I should instead. I agree that is a driver matter. Thanks for the replies.