Retrieving ip-adress with vb.net application

  • Thread starter Thread starter Sven Wynsberghe
  • Start date Start date
S

Sven Wynsberghe

Like the topic states, is there any way I can get the ip-adress of my
computer with a vb.net application?

thanks for the help :)
 
Imports System.Net
Imports System.Net.Sockets
Dim IPAddress As New
IPAddress(Dns.GetHostByName(Dns.GetHostName).AddressList(0).Address)
Dim strIPAddress As String = IPAddress.ToString
 
The answer has been posted but just make sure that the variable name is
different from the type ( IPAddress)
Keep up the good work.

Thanks,
sarika


Imports System.Net
Imports System.Net.Sockets


Dim IPAddress1 As New
IPAddress(Dns.GetHostByName(Dns.GetHostName).AddressList(0).Address)
Dim strIPAddress As String = IPAddress1.ToString

--------------------
| From: "Thomas" <[email protected]>
| References: <[email protected]>
| Subject: Re: Retrieving ip-adress with vb.net application
| Date: Wed, 10 Sep 2003 14:05:12 +0200
| Lines: 16
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: cpe.atm2-0-1021215.0x503f4156.bynxx14.customer.tele.dk
80.63.65.86
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:136246
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Imports System.Net
| Imports System.Net.Sockets
| Dim IPAddress As New
| IPAddress(Dns.GetHostByName(Dns.GetHostName).AddressList(0).Address)
| Dim strIPAddress As String = IPAddress.ToString
|
| | > Like the topic states, is there any way I can get the ip-adress of my
| > computer with a vb.net application?
| >
| > thanks for the help :)
| >
| >
|
|
|
 
Back
Top