This is what I have so far.
Right there at the button is the code for the 'Go' button. When I put it on the same line it says "End of statement expected." When its on a different line as it is now it says " 'Navigate' is not a member of 'WpfBrowerApplication1.WebBrowser1'. " The file is named "WpfBrowerApplication1"Code:<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class WebBrowser1 Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.TextBox1 = New System.Windows.Forms.TextBox Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.Button3 = New System.Windows.Forms.Button Me.StatusStrip1 = New System.Windows.Forms.StatusStrip Me.ToolStripProgressBar1 = New System.Windows.Forms.ToolStripProgressBar Me.ToolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel Me.WebBrowser2 = New System.Windows.Forms.WebBrowser Me.StatusStrip1.SuspendLayout() Me.SuspendLayout() ' 'TextBox1 ' Me.TextBox1.ForeColor = System.Drawing.SystemColors.ControlDarkDark Me.TextBox1.Location = New System.Drawing.Point(109, 5) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(187, 20) Me.TextBox1.TabIndex = 0 ' 'Button1 ' Me.Button1.ForeColor = System.Drawing.SystemColors.ControlDarkDark Me.Button1.Location = New System.Drawing.Point(302, 3) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(31, 23) Me.Button1.TabIndex = 1 Me.Button1.Text = "Go" Me.Button1.UseVisualStyleBackColor = True ' 'Button2 ' Me.Button2.ForeColor = System.Drawing.SystemColors.ControlDarkDark Me.Button2.Location = New System.Drawing.Point(2, 3) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(40, 23) Me.Button2.TabIndex = 2 Me.Button2.Text = "Back" Me.Button2.UseVisualStyleBackColor = True ' 'Button3 ' Me.Button3.ForeColor = System.Drawing.SystemColors.ControlDarkDark Me.Button3.Location = New System.Drawing.Point(48, 3) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(55, 23) Me.Button3.TabIndex = 3 Me.Button3.Text = "Forward" Me.Button3.UseVisualStyleBackColor = True ' 'StatusStrip1 ' Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripProgressBar1, Me.ToolStripStatusLabel1}) Me.StatusStrip1.Location = New System.Drawing.Point(0, 400) Me.StatusStrip1.Name = "StatusStrip1" Me.StatusStrip1.Size = New System.Drawing.Size(510, 22) Me.StatusStrip1.TabIndex = 4 Me.StatusStrip1.Text = "StatusStrip1" ' 'ToolStripProgressBar1 ' Me.ToolStripProgressBar1.Name = "ToolStripProgressBar1" Me.ToolStripProgressBar1.Size = New System.Drawing.Size(100, 16) ' 'ToolStripStatusLabel1 ' Me.ToolStripStatusLabel1.ForeColor = System.Drawing.SystemColors.ActiveCaption Me.ToolStripStatusLabel1.Name = "ToolStripStatusLabel1" Me.ToolStripStatusLabel1.Size = New System.Drawing.Size(59, 17) Me.ToolStripStatusLabel1.Text = "Status Bar" ' 'WebBrowser2 ' Me.WebBrowser2.Location = New System.Drawing.Point(2, 32) Me.WebBrowser2.Name = "WebBrowser2" Me.WebBrowser2.Size = New System.Drawing.Size(250, 250) Me.WebBrowser2.TabIndex = 0 ' 'WebBrowser1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.ControlDarkDark Me.ClientSize = New System.Drawing.Size(510, 422) Me.Controls.Add(Me.WebBrowser2) Me.Controls.Add(Me.StatusStrip1) Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.TextBox1) Me.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.Name = "WebBrowser1" Me.Text = "My Web Browser" Me.TransparencyKey = System.Drawing.Color.Red Me.StatusStrip1.ResumeLayout(False) Me.StatusStrip1.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) End Sub Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip Friend WithEvents ToolStripProgressBar1 As System.Windows.Forms.ToolStripProgressBar Friend WithEvents ToolStripStatusLabel1 As System.Windows.Forms.ToolStripStatusLabel Friend WithEvents WebBrowser2 As System.Windows.Forms.WebBrowser Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WebBrowser1.Navigate(TextBox1.Text) End Sub End Class
What I want to do is learn how to add these commands:
Code:WebBrowser1.Navigate(TextBox1.Text)Code:WebBrowser1.GoBack()Code:WebBrowser1.GoForward()Code:WebBrowser1.Refresh()to the corresponding button. Right now all I have is the 'Go', 'Back', and 'Forward' buttons.Code:WebBrowser1.GoHome()
Also...
Where could I find more codes like the five above.
Will my status bar work properly as it does in IE and FF?
How do I add my own pictures as the buttons like what IE and FF did with the forward and back buttons?
Ths in advance! Any kind of help at all and I will Rep+ and give thanks!



Reply With Quote




Bookmarks