Hi everybody here !
I`m noob of vb6 and today i will show u how to make a program that shows your IP ! Its noob friendly and everyone can do it !
Lets start !
- Visual Basic 6
Now make a new form , edit it how you want ...
Then add to this form :
- 1 button ( Change its caption to " Get IP " )
- 1 textbox ( Leave it blank )
Don`t change anything else at the properties !
And you need Inet component , go to the menu called Project => Component => And choose "Microsoft Internet Transfer Controls 6.0" , click Apply and OK !
Then at the toolbox that contains controls you should see the icon of Inet control ! Click it and then add Inet to your form. After finishing that step your form will look like this :
Now lets go to Whatismyip.com , you will see your IP there !
Double click on the page ang view the page source :
Press on ur keyboard CTRL + F (Find) and search for the string below without quotes :
" Your IP Address Is: "
There , close the string above , you should see the following HTML comment :
So we need that URL for our program :
<!--Please set your code to scrape your IP from www.whatismyip.com/automation/n09230945.asp For more info, please see our "Recommended Automation Practices" thread in the Forum.-->
You can check it by opening it in your webrowser , you should only your IP , if you double click in the page and view its source , you will view only your IP , and not any other HTML code.. !
So thats perfect for our program !
Right now we're going to add a a little code to our program , to make it functional.
Double click on the button in our form with the caption "Get IP".
Now there between that :
We'll add this little piece of code :
Private Sub Command1_Click()
Text1.Text = Inet1.OpenURL("www.whatismyip.com/automation/n09230945.asp")
This code will get the IP from WhatIsMyIp !
Now run the program by pressing F5 on your keyboard !
Click "Get IP" and after a few seconds , you should see at the textbox your IP !
Hope you like this noob friendly tutorial ! If you do , please +REP !
Its my first one here.
Please don't copy that in other forums without my permission , if you do , at least give credit to me !
Regards => noob of vb6 !