http://www.perlmonks.org?node_id=114446


in reply to How to get screen resolution under Win32?

Look into the Win32-API module which allows you access to the windows registry. From there, look at HKEY_LOCAL_MACHINE\Config\0001\Display\Settings\Resolution.

I may get down-voted for answering this, but it isn't exactly obvious and maybe someone else could benefit.

Replies are listed 'Best First'.
Re: Re: win32 help...
by John M. Dlugosz (Monsignor) on Sep 25, 2001 at 05:00 UTC
    Maybe it varies between Win32 OS's, because I see nothing remotely like that. No Config key under HKLM, and no Resolution key or named value with this information anywhere in the Registry.

    This is Windows 2000.

    —John

      Yes. HKLM isn't really used by MS on Win2k. I'm not sure, but I don't think XP uses it at all.
        HKLM\Software is used extensivly. That's where Classes is stored, as are all-user settings for everything. HKLM\System has tons of stuff in it. HKLM\hardware is used, too.

        So I think HKLM is "really used". On NT4, there are the same 5 sybkeys. So if there's any real difference, it's between Win9x and NT/2000, nothing significant changed in 2k.