ExclamationWeb browser help

Posts 1–15 of 28 · Page 1 of 2
Web browser help
Hey guys, this is nothing related to hacking. I am on a high school robotics team and i am making us a web browser. So i have a few questions

1. I made a web browser, and added a link label. when i click the link it open a mozzila firefox page to the link. I want to site to open in my browser.

How would i do that? (code is WebBrowser1.Navigate(TextBox1.Text)) for browser

2. If the user goes to a site on my browser and gets a pop up, the pop up open in firefox. How would i make it either open in my browser? or in a new window in my browser?

Any help is appreciated. Thanks
Ill ask Arun, so basically you want to set your browser as the default browser. Correct?
I made a web browser, when button1 is clicked it goes to the url. How can i make it search when i hit the enter key? right now i have to click on the actually go button. whats the code?

Thanks.

Nah, I want to make sure everything runs through my browser and DOES NOT auto open ie or firefox.
Quote Originally Posted by zmansquared View Post
I made a web browser, when button1 is clicked it goes to the url. How can i make it search when i hit the enter key? right now i have to click on the actually go button. whats the code?

Thanks.

Nah, I want to make sure everything runs through my browser and DOES NOT auto open ie or firefox.
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
            Button1_Click(sender, e)
        End If
    End Sub
Quote Originally Posted by Blubb1337 View Post
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
            Button1_Click(sender, e)
        End If
    End Sub
I think he wants his link to open in "His Browser" instead of the default browser, which requires nothing more then generating a New Window and WebBrowser upon button click
My post related to this quotation:

I made a web browser, when button1 is clicked it goes to the url. How can i make it search when i hit the enter key? right now i have to click on the actually go button. whats the code?
Quote Originally Posted by zmansquared View Post
Nah, I want to make sure everything runs through my browser and DOES NOT auto open ie or firefox.
Thats what I just said and FYI I merged your threads, theres no need to make 2 threads for 2 questions.
1:
Under linklabel.click:
Webbrowser1.navigate("url here")

2: Something with Javascript I believe, I might work on it later.
Webbrowser Control has a "New_Window" extension, which allows you to control the new window.
OK the enter button question is fixed.

NEW QUESTION : when a website open a pop up, right now it open in firefox. I want the pop to open in my browser.

code for that?
'A new window will be triggered when a link is clicked
'e.cancel will stop your default browser from opening

Code:
Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
 
Dim mybr As HtmlElement = WebBrowser1.Document.ActiveElement
Dim tlink As String = mybr.GetAttribute("href")       

        Dim newweb As New Form1
        newweb.Show()
        newweb.WebBrowser1.Navigate(tlink)

        
        e.Cancel = True
    End Sub
With this code whenever you click a link that opens _Blank / _New or if you right click and open link in new window , it will popup a form (copy of form1 in this case) and display the contents.
e.Cancel = True

is not a member or something.

say you go to a site in my browser, then a pop up comes up it will open in ie or fox. i want it to open in my brower (the pop up)
ok it works but when the new page trys to open i get an IE script error

also if i right click a link while using my browser and click open in new tab i get a script error
Posts 1–15 of 28 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us