Locking your computer through the screen saver
To set up your screen saver to automatically lock your computer:
In Windows 7 and Vista, right-click the desktop, and then select Personalize. In earlier versions, right-click the desktop, and then select Properties.
In Windows Vista, the Personalization window will be open. Select Screen Saver.
In Windows XP, the Display Properties window will be open. Select the Screen Saver tab.
From the drop-down list, select a screen saver file.
In the "Wait:" field, set the amount of time you want the screen saver to wait for activity before starting.
Depending on your version of Windows, check the appropriate box:
On resume, display logon screen
On resume, password protect
Click OK. From now on, when the screen saver comes on, your workstation will be locked.