![]() |
|
[.NET] [VB2008] [Your 2nd program] Advanced Web Browser [Codes, Screen shots, Download] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [VB2008] [Your 2nd program] Advanced Web Browser [Codes, Screen shots, Download] (/showthread.php?tid=121434) |
[VB2008] [Your 2nd program] Advanced Web Browser [Codes, Screen shots, Download] - BETAhkr - Aug 11, 2009 I made a post a few days ago called "[VB2008][Your 1st program] Web browser" It was just to teach some beginners some basic stuff to get them going a bit in Visual Basic 2008. Well someone said to me "There's plenty of them, Make yours more advanced" So I did... This is how to create a Advanced Web Browser in Visual Basic 2008. [You may download the source at the bottom of the page, Send it out, Use the code, I don't care... Enjoy!] I want you to do a few things to your form1 as soon as you open a new project. Do all your basic work such as the properties, the form name, make sure you stretch your form out all the way (It's a web browser), etc. Add 1 Combobox, 6 buttons or pictures, 1 MenuStrip, 1 ToolStatusStrip, 1 timer. Go to the bottom of your form you will see your toolstatusstrip. Click on it and you will see a little box pop up on the side click that and add a progress bar. Your form1 should look like this. [IMG]http://i28.[censored].com/fuqo7k.jpg[/IMG] & [IMG]http://i25.[censored].com/2627fi0.jpg[/IMG] -- Label your buttons or pictures what each one is. Back, Forward, Refresh, Stop, Home, & the far right button is Go. Take 1 tab control and make it the same size as your form 1. It should look like this. [IMG]http://i27.[censored].com/wb5f2e.jpg[/IMG] -- Now go to the menu strip and your going to make 3 rows. 1. File 2. Shortcuts 3. About. In row 1 (File) put 4 options in this order. Add Tab Remove Tab Website Properties Exit In row 2 (Shortcuts) put 12 options in this order. Youtube Myspace Hackforums Tagged Hi5 Bebo Yahoo AOL AIM Wikipedia In row 3 (About) your only going to have that row "About" Do not add options to this. -- Now lets put some code into our buttons or pictures. Back button: Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack()Forward Button: Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward()Refresh Button: Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh()Stop Button: Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Stop()Home Button: Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("hackforums.net")Go Button: Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(ComboBox1.Text)[IMG]http://i25.[censored].com/2qte4xw.jpg[/IMG] -- Lets put in some code in to MenuStrip now. Go to the 1st row file and add these codes File - Add Tab Code Dim Browser As New WebBrowserFile - Remove Tab Code If Not TabControl1.TabPages.Count = 1 ThenFile - Website Properties Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPropertiesDialog()File - Exit Code Me.Close()Lets put code into row 2 now (Shortcuts) Shortcuts - Youtube Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("www.youtube.com")Shortcuts - Myspace Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("www.myspace.com")Shortcuts - Hackforums Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("hackforums.net")Shortcuts - Google Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("www.google.com")Shortcuts - Wikipedia Code CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("www.wikipedia.org")You will get the idea of adding more shortcuts (If you want) No need for me to put the code in for all of them Especially since you can download the project at the bottom. Now row 3 (About) Double click on "About" and add this code. -- Now go to your timer1, Add in this code. Code Msgbox ("Put the About me of the program in here")Now open your code and right under Public Class Form1 Put this whole code. Code Dim int As Integer = 0Then double click on your form1 to get to your Form1_Load Enter in this code. Code Dim Browser As New WebBrowserIt will look like this. [IMG]http://i28.[censored].com/2uszazb.jpg[/IMG] Now add your icon, Save your project, Build it. And now you have an Advanced Web Browser that was coded in Visual Basic 2008. Here is the download for the source. "I uploaded with MediaFire.com which scans files for a virus before uploading it" Code http://www.mediafire.com/?sharekey=5a00dce134c3035cd8f14848abf485dde04e75f6e8ebb871- Endeavour - Aug 11, 2009 Wow, really good work man, I just started learning some VB not that long ago, and I'm sure this can get me off to a good start. +rep if i could :P - tylerdav44 - Aug 11, 2009 how well its detailed you just tought ppl how to do it right there nice work man - BETAhkr - Aug 12, 2009 Come on people, Comment on this, This is a great tutorial!!! - degger - Aug 14, 2009 awesome man, well explained + good pics. NICE work dude. Good for beginners like me! - DrSponge - Aug 14, 2009 Very nice :) good work - starstruckedsam - Aug 14, 2009 great work! im new to VB. i created my own browser but wasn't able to get certain codes. this helped me finish it. - BETAhkr - Aug 15, 2009 Thank you to all 3 of you. - EMINƎM - Aug 22, 2009 Great work dude helped me alot - BETAhkr - Aug 22, 2009 Well, You made me this sig, And I helped you with the web browser... Lets call it even? lol. :) - Security-Root - Aug 23, 2009 Nice Webbrowser! Keep It Up :) - the gost - Aug 23, 2009 this so great mate keep it up - BETAhkr - Aug 23, 2009 Thanks to both of you above me ^^ - SgtPunishment - Aug 31, 2009 I found this tutorial, and i've completely updated my current browser, and my god it looks amazing now, but my only question is, how do I get the ToolStripStatusLabel1 to update like from "Loading..." to "Done" once the web page has finished loading? Oh yeah, how can I use cut / copy / paste / select all with this browser? as well as Open and Save... ? I had it on my previous browser, but I can't use it on the advanced one made by this amazing tutorial - BlueMelon - Aug 31, 2009 Well, on the Go or enter or w/e button. ToolStripStatusLabel1.text = "loading..." double click the webbrowser (default should be documentcomplete) Add ToolStripStatusLabel1.text = "Done!" |