is there anyone that could give me hint how to retrieve the display settings on a PC so that I can use them in my Access application.
By display settings I mean things like :
-screen resolution (800x600, 1024x768,....)
-color palette (256 colors, 65536 colors,.....)
-font size (Small fonts, Large fonts)
-refresh frequency (72, 75, 85 Herz)
If you should have code to get (or set) these properties, please give me hand in solving this.
This snippit of code finds 2 keys, I couldn't find all the others, but I'm pretty sure with some digging you could find them. I would add that not all PC reg's are the same. So be careful where you take the info from.
Lastly, you'll notice the HKCU in the reg key, it is HKey_Current_User, but all you need is the first two letters and then the first letter of each word after:
HKey_local_machine = HKLM.
Then take down the path and finally the key you want to retrieve a value for.
Hope it helps.
PS And yes before you ask, with a little bit of tweaking you an alter the registry, so be careful !!! (This code should only read)
Thanks Ken, nice solution this last one....
In the meantime, I also found this one.
Unfortunately, this function did not give me all that I want.
Yes, I can get the resolution with htis one but not the System Font Size.
As you probably know : if you design a form with Small Fonts, and set all the controls nicely aligned etc. it looks as you want it
When you change to Large Fonts and reboot your PC, your nicely looking form is not so nice any more.
Therefore, i need to get the Font Size so that I can remodel my form on loading, depending on the current settings for the System Font Size.
So if you find a function to retrieve that font size, please let me know!