It is a useful function in Android to use screen lock. A screen pattern can also be used to unlock the device. It prohibits unauthorized activity of others in your phone.
Now, in Windows you can use this functions also. Download the small software EMLSetup.exe from here. Look at the screenshot below.
Here you can also use custom screen background. So, you can easily protect your your work from others and leave the PC for a while.