Before Windows XP starting the screen saver would also lock your computer. But as of Windows XP and continued in Windows Vista there isn't a built in way to lock your computer and start the screen saver. The screen saver I use, Marine Aquarium 3 is so beautiful that I prefer to have it start right away whenever I lock my computer. Here is a way to start your screensaver and lock your computer at the same time which will work on Windows Vista 32 bit, or 64 bit, and Windows XP 32 bit or 64 bit.
First you need to know the path to the screen saver file you want to start when locking your computer. Most screen savers are kept in the C:\Windows\System32 folder. Browse that folder and look for all files of the type ".scr".
Once you've decided which screen saver to start, the trick to both locking your computer and starting your chosen screen saver is to create a .bat file with commands to do both within it. Here's how to do so:
First open notepad and enter the following:
C:\Windows\System32\[Your Screen Saver File Here] -s
C:\Windows\System32\rundll32.exe user32.dll, LockWorkStation
My file looks like this:
C:\Windows\System32\MarineAquarium3.scr -s
C:\Windows\System32\rundll32.exe user32.dll, LockWorkStation
Save the file to the location of your choice. I like to name the file "Lock"
For the next step you'll need to have windows set to show you file extensions. To do so open an explorer window and choose "Tools - Folder Options" from the menu. (To see the menu in Windows Vista press the "Alt" key.)
On the "View" tab uncheck the "Hide extensions for known file types" checkbox.
Next right click on the text file you just created and choose "Rename". Change the file's extension from ".txt" to ".bat"
You now have a file that you can double click which will start your chosen screen saver. And more importantly your computer will be locked when you turn the screen saver off.
To make the file even more useful you may wish to create a shortcut to it. To do so right click on the file and choose "Create Shortcut". The shortcut file that appears may now be placed on your desktop (or the location of your choice) to give easy access to locking your computer.