Results 1 to 3 of 3
  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2011

    Lightbulb [TuT] Get Your IP [VB6]

    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 !

    Requirements :
    - 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 :

    <!--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.-->
    So we need that URL for our program :

    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 :

    Private Sub Command1_Click()
    End Sub
    We'll add this little piece of code :

    IP Code:
    1. 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.
    Enjoy !!
    Please don't copy that in other forums without my permission , if you do , at least give credit to me !

    Regards => noob of vb6 !

  2. #2
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Wales UK

    Re: [TuT] Get Your IP [VB6]

    Nice tut tho I think it should be moved to the code bank

  3. #3
    Join Date
    Mar 2015

    Re: [TuT] Get Your IP [VB6]

    A Noob friendly piece of Noob code. Happy Noob-a-ling! Just joking. Thanks for the tute.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.