Results 1 to 2 of 2

Thread: Pressing Enter...

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    7

    Arrow

    Hi,
    I'm writing a browser with a simple textfield, a command button, and the IE window. The URL is entered into the textfield and the IE will "navigate" to the URL once the command button is clicked on. I want to get rid of the command button and replace it with the "Enter" key, how is this done.

    Thank you in advance for your reply...

  2. #2
    Lively Member
    Join Date
    Nov 1999
    Location
    Melbourne, Victoria, Australia
    Posts
    126
    Try some code like this...
    These object names will not be correct so you will need to modify them accordingly...

    Private Sub IEAddressBar_KeyPress(KeyAscii as Integer)

    If KeyAscii = 13 Then

    ' If we press enter, dont include the enter key (by setting KeyAscii to 0)
    ' but trigger the event to navigate to the address or what
    ' ever you want to execute at this point

    KeyAscii = 0
    IEObject.NavigateURL
    End If

    End Sub
    Regards,

    Paul Rivoli
    ---------------------
    [email protected]
    http://members.dingoblue.net.au/~privoli

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