Turn Off Monitor When You Lock Windows with Autohotkey
I had been using RedmondPies Turn Off LCD utility in a batch file to turn off my laptops LCD display *and* lock Windows for quite sometime. But it was still a lotta work to run the batch file every time I wanted to lock windows. So I went ahead and wrote this tiny Autohotkey script to automatically turn off the display when I lock Windows using the Win+L key combination.
My ZzzLCD utility turns off the monitor when you Press Win+L to lock Windows.

ZzzLCD – Auto LCD Turn off
ZzzLCD is a tiny Autohotkey script containing the following code:
#NoEnv #NoTrayIcon SendMode Input SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #l:: Run,%A_WinDir%\System32\rundll32.exe user32.dll`,LockWorkStation Sleep 1500 SendMessage 0x112, 0xF170, 2,,Program Manager
You can paste the above code in notepad, save it as a .ahk file and compile it yourself.
OR
You can download the pre-compiled ZzzLCD.exe.
Download ZzzLCD.exe
Start Up with Windows
If you want to have ZzzLCD startup with Windows on every reboot, perform the following steps:
- Right click on ZzzLCD.exe and create a shortcut.
- Go to Run (Win+R), type
%appdata%and press Enter. - In the folder that opens up, browse to
Microsoft\Windows\Start Menu\Programs\Startup - Copy paste the shortcut that you created in step 1 inside the Startup folder.
Done. Now ZzzLCD will run every time Windows starts up. :)
Please leave a comment if you have any suggestions. :D




May 24, 2010 - 10:58 am
Nice guide there. I’ve also created a very small application that enable you to turn off your monitor, it doesn’t matter for a desktop or laptop, and your monitor/lcd/screen will be turn off after you run the application. No installation, and no configuration required. You may download for free at: http://www.bustatech.com/turnoffmonitor/
.-= bustatech´s last blog ..Google Pac-Man, Visit http://www.google.com Today =-.
May 26, 2010 - 11:29 pm
Nice work. :) What language did you code your utility in? Nice site you got there too. :)
March 17, 2011 - 5:42 am
GreenMonitor is working well for me. Source and binary available, CC licensed. I didn’t write it, just pointing it out.
http://www.codeproject.com/KB/winsdk/Turn_OFF_Monitor_OnLock.aspx
March 17, 2011 - 11:37 am
:) Yes, that utility does the job as well. But call it personal preference, I like to have portable apps for tiny jobs like this. Thanks for the link though, it’s very well explained and I think it’ll be of help in my personal .NET utility development program :)
September 19, 2011 - 3:06 am
Awesome utility! Thanks!
September 20, 2011 - 2:52 pm
Thanks for letting me know that it works well for you! :D