VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Design a simple web browser that can be modified for more advanced features. Very simple!! Only one

by Andrew Arnold (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 5th January 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Design a simple web browser that can be modified for more advanced features. Very simple!! Only one line of code.

Rate Design a simple web browser that can be modified for more advanced features. Very simple!! Only one



'               ...:.::Andrew Arnold::.:... 
' This program was created as an idea of how a browser can be made. And easily too. 5-1-02
'To get started you will need only one Form. Call it frmBrowser. After naming the form, go to Project - Components (or [ctrl] + [T]). Scroll down in the Components dialog box and find "Microsoft Internet Controls". Check this box, and click OK. Now, add this control to your form. make the form a large enough size to hold a webpage, and then add the WebBrowser Control. You can leave it named WebBrowser1. Now, resize the Browser control to about the same size as your form, and leave space for a Text box, and a Command Button. Now all you need to do is add the Command Button, and Text box. Double click the Command Button. Add this code to the "Private Sub Command1_Click()" section.

Private Sub Command1_Click()
     WebBrowser1.Navigate Text1.Text
End Sub

'Now, save and run the program. When you run it, type the url (exmp. "www.yaho.com"), and click the command button. You must be connected to the internet in order for this to work. The website should display in the white area of your browser control. Neat huh. Stop, forward,back,refresh, and link buttons can be answered also. To add a the following buttons, just copy each of these into different combo box code areas.
'Stop the page from loading
Private Sub Command2_Click()
     WebBrowser1.Stop
End Sub

'Move Forward a page
Private Sub Command3_Click()
     WebBrowser1.GoForward
End Sub

'Move Back a page
Private Sub Command4_Click()
     WebBrowser1.GoBack
End Sub

'Refresh the page
Private Sub Command5_Click()
     WebBrowser1.Refresh
End Sub

'To make a button that goes directly to a website make a command button,a nd put in this code. To make it go to a different website, just change the url in the parenthasese.
Private Sub Command_Click()
     WebBroswer1.Navigate ("www.yahoo.com")
End Sub

'Well... that's it. Have a great day.

Download this snippet    Add to My Saved Code

Design a simple web browser that can be modified for more advanced features. Very simple!! Only one Comments

No comments have been posted about Design a simple web browser that can be modified for more advanced features. Very simple!! Only one. Why not be the first to post a comment about Design a simple web browser that can be modified for more advanced features. Very simple!! Only one.

Post your comment

Subject:
Message:
0/1000 characters