Jump to content

cbox


Recommended Posts

Posted

1.) Let's start by creating a new C# Windows Application ( File -> New -> Project -> Windows Application ). Name the project What ever you like.

 

2.) Put this at the using method

 using System.Net;

 

3.) Make an TextBox Anywhere in the Form

 

4.) Double click the Form1 And it should take you to private void Form1_Load And add the following Code

//Get the host
string myHost = System.Net.Dns.GetHostName();
// Get the IP 
string myIP = System.Net.Dns.GetHostByName(myHost).AddressList[0].ToString();
// Show IP
this.textBox2.Text = (myIP);

Your Done! Build it and it will show your IP :) I will add An Source Project

 

Need a Tut Written in C#? Feel free to ask me

This tut was brought to you by xXxStevenxXx of Blueshadowz

 

IP.rar

  • 7 months later...
  • 2 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...