|
-
Aug 8th, 2012, 11:49 AM
#1
Thread Starter
New Member
Custom Browser project want ideas and well... help ?
ok
well im new here and i hope this is the correct place to post this
anyway...
i started creating the simple tutorial browser like a week ago and now im slowly modifying it into an advanced one
currently i have the project called ArachniD browser v1,v2, and now v3 is my current platform
also have a custom (green scorpion) v2 version browser for kicks
i am trying to create a favorites/ bookmark for my web browser but i havent found any good tutorials of how to do it, some ideas or help would be nice.
i am also trying to make a way to open links in a new tab if the user wants to.
i am running into an issue which is i get an error when running scripts on some pages, it usually happens if its a flash game or a active advertisement (wish i could run add block plus on this)
i also would like ideas of other programs that may be useful when browsing, currently users can use all print options, new tab, delete tab, open new window, web properties, web options, open notepad, , open command prompt, open calculator.
currently the browser runs about 28,000 kb when running, but if user does flash games it can hit 100,000 kb with a 20,000 flash player plugin
the projects intent is to create a low footprint browser that can run all typical and some unique options for users.
Arachnid V3 code
HTML Code:
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
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 Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
Browser.Name = "ArachniD V.02"
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 Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.google.com/search?sourceid=navclient&ie=UTF-8&r*lz=1T4SUNA_enUS296US296&q=" & TextBox1.Text)
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
Browser.Name = "ArachniD V.02"
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 Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh()
End Sub
Private Sub ComboBox1_KeyDown1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
If e.KeyCode = Keys.Enter Then
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(ComboBox1.Text)
End If
End Sub
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.google.com/search?sourceid=navclient&ie=UTF-8&r*lz=1T4SUNA_enUS296US296&q=" & TextBox1.Text)
End If
End Sub
Private Sub NewTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewTabToolStripMenuItem.Click
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
TabControl1.SelectTab(int)
Browser.Name = "ArachniD V.02"
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()
Dim tbpNewTab As New TabPage
Dim wbBrowser As New WebBrowser
End Sub
Private Sub PrintReviewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintReviewToolStripMenuItem.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPrintPreviewDialog()
End Sub
Private Sub PrintToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintToolStripMenuItem.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPrintDialog()
End Sub
Private Sub WebsitePropertiesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WebsitePropertiesToolStripMenuItem.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPropertiesDialog()
End Sub
Private Sub PageSetupToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PageSetupToolStripMenuItem.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPageSetupDialog()
End Sub
Private Sub NewPageToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewPageToolStripMenuItem.Click
Dim F As Form
F = New Form1
F.Show()
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
End
End Sub
Private Sub NetOptionsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NetOptionsToolStripMenuItem.Click
Process.Start("inetcpl.cpl")
End Sub
Private Sub CalculatorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculatorToolStripMenuItem.Click
Dim CalcProcess As Process
CalcProcess = Process.GetProcessById(Shell("Calc.exe"))
End Sub
Private Sub CMDToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CMDToolStripMenuItem.Click
System.Diagnostics.Process.Start("cmd.exe")
End Sub
Private Sub NotepadToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NotepadToolStripMenuItem.Click
Dim p As New Process()
p.StartInfo = New ProcessStartInfo("notepad.exe", "C:\test.txt")
p.Start()
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
End Class
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|