We all know how to lock Microsoft Windows using the hotkey Win + L when getting up from your desk and walking away from your computer for a while, so that nobody else can use your computer. But what if you do not want to lock whole of the Windows and want to lock only one application? Microsoft Windows does not offer any option to lock only one window but a third party app called Xetoware WinLock can help you do that. WinLock is a freeware program that can lock any window with a simple hotkey, and password protect it with a secure password.
You can download WinLock from the Xetoware website. The download is around 1.4 megabytes in size and available in form of a setup installer. After the installation, WinLock automatically runs but you can also run it from its Start Menu shortcut. It would ask you to enter a password to lock or unlock a window. The default password is 123 but it is suggested that you change it. After entering a password you can click on the Hide WinLock to Taskbar Tray to hide the WinLock window to system tray.
Now if you want to lock a window, just press the hotkey Ctrl + Space when that window is in focus. That window would automatically hide and you would see a new icon related to the locked window in the system tray. If you double-click on this new icon, you would be asked for a password to unlock that window. After supplying the password, the window would be unlocked and made visible.
When you press Ctrl + Space hotkey for a window, WinLock sends the SW_HIDE message to that window which hides it. Even without WinLock, you can use tools like Windows Detective or Spy++ to bring back the hidden windows by sending SW_SHOW message to it (only for geeks). This is not a very secure method to lock a window but can work for hiding your applications from friends, family and colleagues.
You can download WinLock from http://www.xetoware.com/winlock.html.