
Athlon XP
Veteran

Jul 3, 2005, 1:18 PM
Post #1 of 8
(559 views)
Shortcut
|
|
How to make a custom web browser.
|
Can't Post
|
|
The first thing you want to do is expand the form box as large as you can get it. I mean BIG. Next, right-click the toolbox and click Components. Scroll down to Microsoft Internet Controls, check it, and click OK. Find the little Earth button that appeared on the toolbox and place it on the form. Expand it so it fills all but a thin area on the top of the form. On the top that's not filled by our browser window, put a long textbox and a button. Label the button "Go," then double-click it to open the code editor. Type this line of code: WebBrowser1.Navigate Text1.Text Your browser now works, but you will notice that if you resize the form window, the browser view does not change. This is why I wanted you to make it so big. To edit this so that the browser view resizes as well, double-click on the form and type this code in the appropriate section: Private Sub Form_Resize() WebBrowser1.Top = Text1.Height WebBrowser1.Width = Form1.ScaleWidth WebBrowser1.Height = Form1. ScaleHeight Text1. Height And the line "End Sub" should be directly below. Voila. You authored a browser, but I find it painful without a Back button. Too bad I don't know how to do that.
Lord I was born a shamblin' man Archives (Newest Addition: The Judgment of Tate's Father)
|