Click Start > Settings > Security, and then click Device 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 a length of time from the 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.