To lock files:
  1. In the Project Explorer, select the file to lock. If you select a folder, project, or solution, any eligible child items will also be locked.
  2. Choose Source Control > Lock or press Ctrl+R, L.
  3. The dialog will list the files that can be locked.
  4. In that dialog, you can deselect any files you don't want to lock and enter an optional comment.
  5. Click Lock.

Enabling the VCS > Options > Lock Immediately option will bypass the dialog and immediately lock files without a comment.