By Bryan Keadle
GetScreenRes is a simple utility that will create registry keys and temporary files to indicate a person's current screen resolution. What's the point? Perhaps you have some scripting you'd like to do and need to know, programmatically, what the user's current screen resolution is; or perhaps you want to have a conditional application object based on the user's screen resolution.
For example, I have a couple application objects to allow users to set their screen resolution to a few pre-defined standard sizes - so they can have a choice of screen resolutions, but without giving them access to Windows' Display settings (and potentially selecting an unsupported resolution). I wanted a way to show the application objects of the resolution choices that *didn't* include their existing resolution. This graphic shows the available screen resolutions, excluding the 1024x768 option because that's the resolution currently set:
Also, for another project, I wanted to know what size of a particular watermark graphic to copy to their local workstation that matches their current screen resolution.
GetScreenRes makes this screen resolution information easily accessible. It creates the following registry keys (using 1024x768 resolution as an example):
And creates the following files:
both files containing the text:
So you have 3 different ways to read this screen information, whatever works best for you for certain situations.
As for my NAL object example above, I simply ForceRun GetScreenRes to run upon login, and my Screen Resolution objects are dependent on the registry key value to *NOT* equal the resolution it is set for:
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.