Did you mean the full code of the browser or the full code of the section we are working on??
This post has been edited by sbh: 27 July 2008 - 02:27 PM




Posted 27 July 2008 - 02:22 PM
This post has been edited by sbh: 27 July 2008 - 02:27 PM
Posted 27 July 2008 - 02:29 PM
sbh, on 27 Jul, 2008 - 10:22 PM, said:
This post has been edited by AdamSpeight2008: 27 July 2008 - 02:30 PM
Posted 27 July 2008 - 02:45 PM
Public Class Form1
Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.GoBack()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
WebBrowser1.GoForward()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Refresh()
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
WebBrowser1.Navigate(TextBox1.Text)
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
Private Sub FileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FileToolStripMenuItem.Click
End Sub
Private Sub NewWindowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewWindowToolStripMenuItem.Click
Dim f2 As New Form
WebBrowser1.Navigate("http://www.sbhweb.co.nr")
f2.Show()
End Sub
Private Sub printToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles printToolStripMenuItem.Click
Dim printer As New PCPrint()
printer.PrinterFont = New Font("Verdana", 10)
printer.TextToPrint = TextBox1.Text
printer.Print()
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
End
End Sub
Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CutToolStripMenuItem.Click
End Sub
Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyToolStripMenuItem.Click
End Sub
Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteToolStripMenuItem.Click
End Sub
Private Sub SelectAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelectAllToolStripMenuItem.Click
End Sub
Private Sub SourceToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SourceToolStripMenuItem1.Click
Me.Show()
End Sub
Private Sub Form1_ProgressChanged(ByVal sender As Object, _
ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged
If e.CurrentProgress < e.MaximumProgress Then
If ToolStripProgressBar1.Value >= ToolStripProgressBar1.Maximum Then
ToolStripProgressBar1.Value = ToolStripProgressBar1.Minimum
Else
ToolStripProgressBar1.PerformStep()
End If
Else
ToolStripProgressBar1.Value = ToolStripProgressBar1.Minimum
End If
End Sub
Private Sub Form1_Load2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized
Me.Controls.Add(TabControl1)
TabControl1.Dock = DockStyle.Fill
End Sub
Private Sub NewTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewTabToolStripMenuItem.Click
Dim tabpage As New TabPage
Dim Form1 As New WebBrowser
Form1.Dock = DockStyle.Fill
AddHandler Form1.Navigating, AddressOf WebBrowser_Navigating
AddHandler Form1.DocumentCompleted, AddressOf WebBrowser_DocumentCompleted
tabpage.Controls.Add(tabpage)
tabpage.Controls.Add(Form1)
Form1.Navigate("http://www.sbhweb.co.nr")
End Sub
Private Sub WebBrowser_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs)
sender.parent.text = "Loading....."
End Sub
Private Sub WebBrowser_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
sender.parent.text = sender.document.Title
End Sub
Private Sub CloseTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseTabToolStripMenuItem.Click
TabControl1.TabPages.Remove(TabControl1.SelectedTab)
End Sub
End Class
(line indrora gave put here)
Private Sub NewWindowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewWindowToolStripMenuItem.Click
Dim f2 As New Form
WebBrowser1.Navigate("http://www.sbhweb.co.nr")
f2.Show()
End Sub
This post has been edited by sbh: 27 July 2008 - 02:55 PM
Posted 27 July 2008 - 02:50 PM
Posted 27 July 2008 - 03:05 PM
Public Class Form1
' Modifications
' Moving them to here, makes them accessible to all the code in Form1
Dim withEvents tabpage As New TabPage
Dim withEvents Form1 As New WebBrowser
Dim withEvents f2 As New Form
' End of mods
Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.GoBack()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
WebBrowser1.GoForward()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Refresh()
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
WebBrowser1.Navigate(TextBox1.Text)
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
Private Sub FileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FileToolStripMenuItem.Click
End Sub
Private Sub NewWindowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewWindowToolStripMenuItem.Click
WebBrowser1.Navigate("http://www.sbhweb.co.nr")
f2.Show()
End Sub
' Commented out error3
' Private Sub printToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles printToolStripMenuItem.Click
' Dim printer As New PCPrint()
' printer.PrinterFont = New Font("Verdana", 10)
' printer.TextToPrint = TextBox1.Text
' printer.Print()
' End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
End
End Sub
Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CutToolStripMenuItem.Click
End Sub
Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyToolStripMenuItem.Click
End Sub
Private Sub PasteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasteToolStripMenuItem.Click
End Sub
Private Sub SelectAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelectAllToolStripMenuItem.Click
End Sub
Private Sub SourceToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SourceToolStripMenuItem1.Click
Me.Show()
End Sub
Private Sub Form1_ProgressChanged(ByVal sender As Object, _
ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged
If e.CurrentProgress < e.MaximumProgress Then
If ToolStripProgressBar1.Value >= ToolStripProgressBar1.Maximum Then
ToolStripProgressBar1.Value = ToolStripProgressBar1.Minimum
Else
ToolStripProgressBar1.PerformStep()
End If
Else
ToolStripProgressBar1.Value = ToolStripProgressBar1.Minimum
End If
End Sub
Private Sub Form1_Load2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized
Me.Controls.Add(TabControl1)
TabControl1.Dock = DockStyle.Fill
End Sub
Private Sub NewTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewTabToolStripMenuItem.Click
Form1.Dock = DockStyle.Fill
AddHandler Form1.Navigating, AddressOf WebBrowser_Navigating
AddHandler Form1.DocumentCompleted, AddressOf WebBrowser_DocumentCompleted
tabpage.Controls.Add(tabpage)
tabpage.Controls.Add(Form1)
Form1.Navigate("http://www.sbhweb.co.nr")
End Sub
Private Sub WebBrowser_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs)
sender.parent.text = "Loading....."
End Sub
Private Sub WebBrowser_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
sender.parent.text = sender.document.Title
End Sub
Private Sub CloseTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseTabToolStripMenuItem.Click
TabControl1.TabPages.Remove(TabControl1.SelectedTab)
End Sub
End Class
This post has been edited by AdamSpeight2008: 27 July 2008 - 03:08 PM
Posted 27 July 2008 - 03:13 PM
Private Sub NewWindowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [u]NewWindowToolStripMenuItem[/u].Click
WebBrowser1.Navigate("http://www.sbhweb.co.nr")
f2.Show()
End Sub
Private Sub SourceToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [u]SourceToolStripMenuItem1[/u].Click
Me.Show()
End Sub
Posted 27 July 2008 - 03:24 PM
sbh, on 27 Jul, 2008 - 11:13 PM, said:
Private Sub NewWindowToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [u]NewWindowToolStripMenuItem[/u].Click
WebBrowser1.Navigate("http://www.sbhweb.co.nr")
f2.Show()
End Sub
Private Sub SourceToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [u]SourceToolStripMenuItem1[/u].Click
Me.Show()
End Sub
This post has been edited by AdamSpeight2008: 27 July 2008 - 03:24 PM
Posted 27 July 2008 - 03:29 PM
Posted 27 July 2008 - 03:41 PM
Friend WithEvents NewWindowToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Posted 27 July 2008 - 03:58 PM
Private Sub SourceToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles [u]SourceToolStripMenuItem1[/u].Click Me.Show() End Sub
Posted 27 July 2008 - 04:42 PM
Posted 27 July 2008 - 04:49 PM
sbh, on 28 Jul, 2008 - 12:42 AM, said:
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
