Click Start > Settings > Personal tab, and then click Lock. [or Start > Settings > Lock.] If there is an existing device lock and you want to change it, enter the device lock password and then click Unlock.
Select the Prompt if device unused for check box, then select the desired length of time from the drop-down list.
Click the Password type box, and select the type of password you want.
Enter the password you want to use, and then confirm the password.
On the Hint tab, enter a phrase that will help you remember your password, but doesn't allow other people to guess your password.
Click Done. [or OK.]