How to make a IP Grabber 11-21-2012, 07:43 PM
#1
Create a New Project.
![[Image: 2014ecb1a7f7b8942a082a5936a36dd2.png]](http://gyazo.com/2014ecb1a7f7b8942a082a5936a36dd2.png)
Add one button and two text box's.
![[Image: b58a85d0afb4a356e900930a34f5d34b.png]](http://gyazo.com/b58a85d0afb4a356e900930a34f5d34b.png)
Double click button1 and add this code.
That is it, debug and test it, i am using visual studio 2010.
Thanks to Cyber-Savage
Spoiler:
![[Image: 2014ecb1a7f7b8942a082a5936a36dd2.png]](http://gyazo.com/2014ecb1a7f7b8942a082a5936a36dd2.png)
Add one button and two text box's.
Spoiler:
![[Image: b58a85d0afb4a356e900930a34f5d34b.png]](http://gyazo.com/b58a85d0afb4a356e900930a34f5d34b.png)
Double click button1 and add this code.
PHP Code:
Dim hostname As IPHostEntry = Dns.GetHostByName(TextBox1.Text) 'this makes the program know that textbox 1 is the hostname
Dim ip As IPAddress() = hostname.AddressList 'This Grabs the ip address from the host
TextBox2.Text = ip(0).ToString() 'This displays the ip address in Textbox 2
That is it, debug and test it, i am using visual studio 2010.
Thanks to Cyber-Savage



![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)


















