What do you mean by lock? Putting it on standby (if it is on standby, if returns to the Log On menu without actually logging off your account, and you would still need to enter the password if you have one)?
If so...
rundll32.exe user32.dll, LockWorkStation