Como hacer un Navegador Web con Visual Basic Express 2013

hotcubano Seguir

Beta
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Desde
15 Sep 2010
Mensajes
116
Por favor, ten en cuenta 📝 que si deseas hacer un trato 🤝 con este usuario, está baneado 🔒.
Esta en ingles, pero hay lo voy a ir traduciondo. Cualquier duda, me dicen.

1- First download visual studio express from here, and install it. Run Visual Studios Express and select new project and name of the new project.

98ez.png


2- We do large our form. Then add 5 button and change their names.
Insertar CODE, HTML o PHP:
Botton1: <
Botton2: >
Botton3: Go
Botton4: Refresh
Botton5: Home

m0m9.png


- Then added a MenuStrip and named a name.

7iuq.png


- Then added a StatuStrip, right click and intser StatusLabel, ProgressBar.

ofmv.png


- Add a Timer, ComboBox. In the ComboBox properties, look where says Anchor, and write Top, Bottom, Left, Right.

bb30.png


- Now most importantly, add a TabControl and enlarged. In the TabControl properties look where says TapPages and click in Remove, Ok. In the same properties TabControl seek Anchor and write this Top, Bottom, Left, Right

czqd.png



3- Now double-click on From1 and delete everything and paste this another:
Insertar CODE, HTML o PHP:
Public Class Form1
Dim int As Integer = 0

Private Sub Loading(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserProgressChangedEventArgs)
ToolStripProgressBar1.Maximum = e.MaximumProgress
ToolStripProgressBar1.Value = e.CurrentProgress
End Sub
Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentCompletedEventArgs)
TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle
ComboBox1.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Url.ToString
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack()
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh()
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub

Private Sub NewTabToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NewTabToolStripMenuItem.Click
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
TabControl1.SelectTab(int)
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub

Private Sub CloseTabToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CloseTabToolStripMenuItem.Click
If Not TabControl1.TabPages.Count = 1 Then
TabControl1.TabPages.RemoveAt(TabControl1.SelectedIndex)
TabControl1.SelectTab(TabControl1.TabPages.Count - 1)
int = int - 1
End If
End Sub

Private Sub PropretiesToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PropretiesToolStripMenuItem.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPropertiesDialog()
End Sub

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
ToolStripStatusLabel1.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).StatusText
End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(ComboBox1.Text)
End Sub

Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged

End Sub
End Class

tkdp.jpg


After this, Run Start

cisi.jpg
 
Arriba