Jump to content

Basic Browser.

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Paradox

Paradox

    Newbie

  • Members
  • PipPip
  • 20 posts
Here is what you need.
* 5 Buttons
* 1 Webbrowser
* 2 Textbox


Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        WebBrowser1.GoForward()

    End Sub


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        WebBrowser1.GoBack()

    End Sub


    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        WebBrowser1.Navigate(Texbox1.Text)

    End Sub


    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        WebBrowser1.Refresh()

    End Sub


    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

        WebBrowser1.Navigate("http://www.google.com/search?hl=en&q=" + Texbox2.Text)

    End Sub

End Class


#2
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
Very little code...! VB is compact... :)
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#3
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Great tutorial. Thanks for your contribution!

Posts moved here:
http://forum.codecal...-wrapper-2.html

#4
Umbrageous

Umbrageous

    Newbie

  • Members
  • PipPip
  • 17 posts
Hmm, Yeah its simple, but only works for vb6 My Code because i use vB 2005 and the browser i made uses tabs looks more like this
Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles ToolStripButton4.Click
        CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh()
    End Sub

    Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton5.Click
        CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Stop()
    End Sub

    Private Sub ToolStripButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton6.Click
        CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
    End Sub
    Friend WithEvents ToolStripButton7 As System.Windows.Forms.ToolStripButton

    Private Sub ToolStripButton7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton7.Click
        CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("Can't post Links...." & ToolStripTextBox2.Text)
    End Sub