PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
pressing enter-VBForums
Results 1 to 7 of 7

Thread: pressing enter

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    83

    pressing enter

    i'm making my own web browser and the only thing i havent got to work is in the text box where you type the url, i would like the user to be able to press enter to get to their destination rather than having to click go. Does anybody know how to do this.

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,172

    Re: pressing enter

    VB Code:
    1. if keyascii = 13 then
    2. keyascii = 0
    3. 'go to website
    4. end if

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    83

    Re: pressing enter

    what class should i put it in

  4. #4
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: pressing enter

    Quote Originally Posted by algi
    what class should i put it in
    I don't know what you mean by class, but you would put that code in the KeyPress event of the textbox.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    83

    Re: pressing enter

    but it doesn't recognise keyascii

  6. #6
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: pressing enter

    Quote Originally Posted by algi
    i'm making my own web browser and the only thing i havent got to work is in the text box where you type the url,
    Quote Originally Posted by algi
    but it doesn't recognise keyascii
    All standard VB textboxes have a KeyPress event that will recognize KeyAscii. If you aren't using a standard VB textbox, what are you using?
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  7. #7
    Android OpenGL ES Guru Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,256

    Re: pressing enter

    He could be using KeyCode instead, in the KeyDown/KeyUp event.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width