PDA

View Full Version : wonna get past websence? Here is your desire!



carlo
11-22-2005, 12:11 PM
I got this from astalavista. This works by creating your own browser in visual Basic. I hope this helps.
--------------------------------------------------------
Making a web browser is so simple. It consists of only a few lines of code they are so easy to make use. Let's start off with starting a new Visual Basic project, a standard exe.
Add the following controls onto your form:

. 5 command buttons
. * web browser
. a text box

Now what's left to do is put all the code into the commands, as you can see the text box is going to be where you put all of the website urls you want to visit, you could also use a combo box for this which is fine. The command buttons will do different things; the go button is used to go to the website you enter.

As you can see we have got a back button, a forward button, a re***** button a stop button, these are all the basic commands, you can add more as you get more comfortable with the commands.We can now add the code into the commands then you can take it further is you would like.Let's start off with the Form Load part, firstly we can set our default page for the browser when it loads up.

Rename your web browser to anything simple, I have renamed it to 'wb' because it's short and saves me writing out 'webbroswer*.' All of the time.



Private Sub Form_Load()
wb.Navigate \"http://www.softladinc.co.uk\"
End Sub

The code above will load our website into the web browser as soon as the application loads up.

Now put the following code in the buttons required:

Re***** Button

Private Sub Command5_Click()
wb.Re*****
End Sub

Stop Button

Private Sub Command*_Click()
wb.Stop
End Sub

Back Button

Private Sub Command*_Click()
wb.GoBack
End Sub

Forward Button

Private Sub Command2_Click()
wb.GoForward
End Sub

Go Button

Private Sub Command6_Click()
wb.Navigate Text*.Text
End Sub

-------------------------------------------