The computer lock can be achieved in many ways, here is bellow an example which is using the native screen saver possibilities. For a more professional option check the 14 days trial of the usb lock software and folder lock software.
Bellow you find the procedure for installing a password-protected screen saver. Please make sure you have selected a screensaver and it is set to start within 15 minutes of inactivity.
Step 1 – Right click anywhere on your desktop (except on an icon) which will display the following panel:
Step 2 – Highlight the <Properties> selection (as shown above ) and click it with your left mouse button.
This will display the following panel:
Step 3 – Click on the <Screen Saver> tab on the upper center of this panel.
Pick a screen saver from the screen saver drop down list (highlighted in green).
Step 5 – Select a <Wait> time of 15 minutes or less by clicking on the up and down arrows in the <Wait> box.
Step 6 – Click on the <On resume, password protect> check box.