|
-
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
-
Aug 9th, 2012, 09:52 AM
#2
Thread Starter
New Member
Re: Custom Browser project want ideas and well... help ?
-
Aug 9th, 2012, 10:55 AM
#3
Re: Custom Browser project want ideas and well... help ?
Please don't bump your thread. It's extremely disrespectful of the many people here who are very generous with their time in helping people with genuine difficulties. They are not underany obligation to you. If you're not getting replies it's because there is a lack of any obvious question that people can respond to. If you're having a problem, please be specific about what the problem is and post only that section of your code which you suspect to be at fault.
-
Jan 27th, 2013, 03:29 PM
#4
New Member
Re: Custom Browser project want ideas and well... help ?
Hi
My first post
I have a tabbed web browser. Works very well
Sub AddTabPage(ByVal URLFound)
Dim tp As New TabPage()
tab1.TabPages.Add(tp)
Dim web1 As New WebBrowser()
web1.Name = "web"
web1.Navigate(URLFound)
tp.Controls.Add(web1)
tab1.SelectedTab = tp
End Sub
I would like to detect if someone clicks a link in one of the browsers.
eg: Original URL was www.apple.com but is now www.apple.com/ipad
I have tried
CType(tab1.SelectedTab.Controls.Item(0), WebBrowser).ShowPropertiesDialog()
Which does display the updated URL
How can I extract it
Kind regards
-
Jan 27th, 2013, 04:11 PM
#5
Re: Custom Browser project want ideas and well... help ?
I'm not really sure that I understand what you're looking for here but URL is a property of the WebBrowser control so it's always accessible, eg. ..
Me.Text = wb.Url.ToString
If you want to detect that the browser Url is changing or has changed there are several events you can employ; Navigating, Navigated, DocumentCompleted.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
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
|