Results 1 to 3 of 3
  1. #1
    wilson945766's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    New york
    Posts
    10
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic

    How to navigate in browser after pressing enter

    as title says

    in firefox or any other browser after u finish typing your url address u can press enter key and it will navigate
    i want to do that but idk how i tried keypress event but it will navigate with any key i just want with enter key

    thank in in advance for any suggestion

    Code:
    Public Class Form1
        Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
            WebBrowser1.Navigate(txtUrl_Navigate.Text)
        End Sub
    
        Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
            WebBrowser1.GoBack()
        End Sub
    
        Private Sub btnFoward4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFoward.Click
            WebBrowser1.GoForward()
        End Sub
    
        Private Sub txtUrl_Navigate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtUrl_Navigate.KeyPress
            WebBrowser1.Navigate(txtUrl_Navigate.Text)
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            btnHome.Text = "Home"
            btnFoward.Text = "Foward"
            btnBack.Text = "Back"
            btnGo.Text = "GO"
            txtUrl_Navigate.Text = "https://google.com/"
        End Sub
    End Class
    Attached Thumbnails Attached Thumbnails
    designer.jpg  


  2. #2
    willrulz188's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Ohio?
    Posts
    1,786
    Reputation
    35
    Thanks
    231
    My Mood
    Amazed
    Code:
    Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
            If e.KeyCode = Keys.Enter Then
                    WebBrowser1.Navigate(Textbox1.Text)
                End If
            End If
    Last edited by willrulz188; 12-07-2011 at 05:14 PM.
    Question ALL statements! ?
    You're in denial that you're in denial. ?
    [img]https://i360.photobucke*****m/albums/oo45/blood188/Untitled-3.jpg?t=1284590977[/img]

  3. The Following User Says Thank You to willrulz188 For This Useful Post:

    wilson945766 (12-07-2011)

  4. #3
    wilson945766's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    New york
    Posts
    10
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    thank willrulz

Similar Threads

  1. [SOLVED] How to create an account after being banned.
    By da20valve in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 6
    Last Post: 11-01-2010, 06:18 PM
  2. Replies: 18
    Last Post: 10-24-2010, 09:13 PM
  3. [HELP] How do i download adobe after effects cs4 For free!
    By NGT.Rock in forum Programming Tutorial Requests
    Replies: 1
    Last Post: 10-15-2010, 06:06 PM
  4. hmmm, how do i make a key press ? what is the command ?
    By thekm1994 in forum C++/C Programming
    Replies: 39
    Last Post: 06-13-2010, 02:52 AM
  5. How To Start CA again After Pacth
    By lumpy760 in forum Combat Arms Help
    Replies: 5
    Last Post: 11-09-2009, 02:55 PM