Can you make an internet browser with microsoft visual basic 2008?
yes you can below you have one option:
Create a new project, and then go to "Project" on the menu.
Click components as shown in the following image.
Find the component "Microsoft Internet Controls," check it, and click "Apply" and then "Close."
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.
Make a textbox, this will be your URL bar where you type in the address of the website you want to see.
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()
Makes the back button go backwards, pretty much self explanatory:
Private Sub Cmdforward_Click()
Same concept, except this time the webbrowser goes forward:
Private Sub cmdgo_Click()
Makes your webbrowser go to the URL in your text box:
Private Sub cmdrefresh_Click()
Makes your web browser refresh:
Private Sub Form_Load()
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)
Jan 15, 2010 |
Compilers & Programming Tools