Simple Browser In VB



Programming Help Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Simple Browser In VB Expand / Collapse
Author
Message
Posted 4/2/2009 5:53:18 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 4/2/2009 7:24:15 PM
Posts: 10, Visits: 4
1)Create a new project, and then go to "Project" on the menu.
2)Click components
3)Find the component "Microsoft Internet Controls," check it, and click "Apply" and then "Close."
4)Click the icon that was just added in the tools window, and draw a large sized window with it. This is going to be where you view webpages through your browser, so don't make it small, but leave room for buttons and other accessories.
5)Make a textbox, this will be your URL bar where you type in the address of the website you want to see.
6)Make four command buttons, these are going to be your Go, Back, Forward, and Refresh buttons, change the captions accordingly, and name each of them Cmdgo, Cmdback, CmdForward, and CmdRefresh.

Now, here's the coding part. This is all it takes to make your webbrowser working.

Private Sub cmdback_Click()
WebBrowser1.GoBack
End Sub'Makes the back button go backwards, pretty much self explanatory.

Private Sub Cmdforward_Click()
WebBrowser1.GoForward
End Sub'Same concept, except this time the webbrowser goes forward.

Private Sub cmdgo_Click()
WebBrowser1.Navigate (Text1.Text)
End Sub'Makes your webbrowser go to the URL in your text box.


Private Sub cmdrefresh_Click()
WebBrowser1.Refresh
End Sub'Makes your web browser refresh.

Private Sub Form_Load()
WebBrowser1.Navigate ("http://programminghelp.com")
End Sub'The URL shows your homepage, change it to http://google.com or whatever your usual homepage you would like to be.

Private Sub WebBrowser1_StatusTextChange(ByVal Text As String)
Text1.Text = (WebBrowser1.LocationURL)
Form1.Caption = (WebBrowser1.LocationName)
End Sub'This changes the text box's text into what URL that you're currently at,
'and the next line makes the caption of your form into the header of the URL.

You could go into more detail by making a menu bar and a setting form making it so you can type in whatever url you would like as your homepage and saving the settings. I may go into that depending on feedback enjoy =]
Post #2412
Posted 4/4/2009 9:46:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 4/4/2009 10:07:48 AM
Posts: 3, Visits: 7
Thank you very much, it is very help me to finish my project.
Post #2770
Posted 4/12/2009 11:09:49 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2/15/2011 2:04:48 AM
Posts: 105, Visits: 137
Nice resource ... Thanks
Post #3168
Posted 5/19/2009 2:15:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/19/2009 5:43:46 AM
Posts: 3, Visits: 34
can we add any other browser plugins than internet explorer? like firefox or safari??
Post #3725
Posted 12/2/2009 12:23:52 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 12/3/2009 3:22:25 AM
Posts: 12, Visits: 3
Hi dear if you want get help about it you can just visit w3schools.com
Post #4703
Posted 1/29/2010 7:56:06 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 1/30/2010 3:34:16 AM
Posts: 17, Visits: 6
Ok .. seems like it worked for all other people and didn't work for me .. it have bunch of errors
Post #5030
Posted 2/12/2010 9:00:08 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 2/12/2010 10:50:24 PM
Posts: 11, Visits: 6
can u tell me from which language visual basic made up.

alok
Post #5100
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: ProgrammingHelp, Viral Unity, Matt.Hill, DaveL, Alex.D

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 9:25am

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.234. 10 queries. Compression Disabled.