Results 1 to 4 of 4

Thread: Using the Enter key in Visual Basic

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4

    Unhappy

    Can somebody please help me. I have designed a library viewer using Visual Basic. The program works fine but one thing is annoying me. I have a password screen in my program which requires the user to enter a password to proceed, I want the program to be set up so that all the user has to do when he/she enters the password is press the Enter/Return key to proceed (assuming they have the password is correct). Does anyone know a piece of code that will allow the user to do this? I would be gratefull for any help as I am just a begginer in programing.

    Thanks
    [email protected]

  2. #2
    Guest

    Arrow

    if you have an ok-button, you could make this button the default button, just have a look in the properties-windows.

    another option would be to use the keypress-event, the ASCII-code for RETURN is 13 or vbCR.

    hope that helps

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4

    Smile Thanks Sascha

    Thanks for that Sascha. It is an OK button that I have.

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Simply set the Default -property of the button to True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width