473,570 Members | 2,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retrieving ip-adress with vb.net application

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 :)
Nov 20 '05 #1
2 6761
Imports System.Net
Imports System.Net.Sock ets
Dim IPAddress As New
IPAddress(Dns.G etHostByName(Dn s.GetHostName). AddressList(0). Address)
Dim strIPAddress As String = IPAddress.ToStr ing

"Sven Wynsberghe" <sv************ *@howest.be> wrote in message
news:ei******** ******@tk2msftn gp13.phx.gbl...
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 :)

Nov 20 '05 #2
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.Sock ets
Dim IPAddress1 As New
IPAddress(Dns.G etHostByName(Dn s.GetHostName). AddressList(0). Address)
Dim strIPAddress As String = IPAddress1.ToSt ring

--------------------
| From: "Thomas" <no****@nospam. nospam>
| References: <ei************ **@tk2msftngp13 .phx.gbl>
| 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: <eq************ **@tk2msftngp13 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: cpe.atm2-0-1021215.0x503f4 156.bynxx14.cus tomer.tele.dk
80.63.65.86
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:136246
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| Imports System.Net
| Imports System.Net.Sock ets
| Dim IPAddress As New
| IPAddress(Dns.G etHostByName(Dn s.GetHostName). AddressList(0). Address)
| Dim strIPAddress As String = IPAddress.ToStr ing
|
| "Sven Wynsberghe" <sv************ *@howest.be> wrote in message
| news:ei******** ******@tk2msftn gp13.phx.gbl...
| > 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 :)
| >
| >
|
|
|

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
15671
by: Alexander N. Spitzer | last post by:
If I have a machine with 3 virtual IP addresses (192.168.1.), how can I start 3 instances of the same RMI application (each started with different properties/configs), each listening on the port 1234, but each instance binds to a different ip address. that is to say: instance #1 binds to 192.168.1.5/port 1234 instance #2 binds to...
1
1341
by: Alfredo Agosti | last post by:
Hi all, I wonder if it's possible to show in a windows all the Session ID of the people connected to my site along with some other information (IP etc). I didn't find how to retrieve all the Session ID but I have examples on how to get the current ID for my session. Any help could be appreciated. Thanks PiGei
1
2823
by: Abby | last post by:
I'm writing a code to send/receive udp packet. I'll receive ip address from user (this is the starting ip), then I'll ask user how many ip he wants to connect to. For examples: Please enter 1st ip: 192.168.0.1 How many ip do you want to connect to: 10 Then, my program will create an array to store 10 ip addresses, starting from...
0
4417
by: Ricky Chan | last post by:
I am using DNSQuery API to get computer name from IP address. However, by below sample code, I don't know how to specify the DNS Address for the field (ByVal aipServers As Integer). any idea? thank you very much ar! ------- <%@ Import Namespace="System.Runtime.InteropServices" %> <%@ Import Namespace="System.Net" %>
2
1385
by: cha | last post by:
Hi there, how is it possible to retrieve the IP-Address of a user that requests my Web-Service written in VB.NET (asmx)? Any way to do this? Thanks for any help in advance, Christian Hartmann
65
21366
by: kyle.tk | last post by:
I am trying to write a function to convert an ipv4 address that is held in the string char *ip to its long value equivalent. Here is what I have right now, but I can't seem to get it to work. #include <string.h> #include <stdio.h> /* Convert an ipv4 address to long integer */ /* "192.168.1.1" --> 3232235777 */ unsigned long iptol(char...
0
2046
by: Andy | last post by:
Hi All. I'm working for a company that has set out a guideline for retrieving data from a database. Nobody can explain to me the reason for the following. When retrieving a set of records from database to a VB.net app, they retrieve the database fields as a record set eg. "select name, suburb from myTable"
20
1553
by: Terry Olsen | last post by:
I'm writing an app that communicates with computers both inside and outside my router. So I need to determine by the remote host's IP address if I need to send them my LAN IP or my Internet IP. Someone suggested AND'ing the IP and my Subnet Mask but I come up with this: My IP: 192.168.0.14 Mask: 255.255.255.0 Result: 192.168.0.0
10
3662
by: Girish | last post by:
Hi Everyone, I am passing a form to a php script for further processing. I am able to retrieve the last value set for that given form variable using $variable=$_REQUEST;
4
3340
by: shirleylouis | last post by:
Hi Ppl, Could anyone help me out with retrieving URL from Clipboard using C#??
0
7726
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7636
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7948
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8150
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7700
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6329
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5523
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3671
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1238
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.