473,569 Members | 2,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting when a network is connected

I know how to detect when a network cable has been plugged in or out, but how
can I detect when an IP address has been received through DHCP? I e how to
detect when the small "connecting to network" icon in the notification area
beside the clock turns to a "connected to network" icon?
Oct 31 '06 #1
1 2124
Try InternetCheckCo nnection or WMI for this
Google to find samples
1) http://groups.google.com/groups/sear...connection+WMI
2)
http://groups.google.com/groups/sear...heckConnection

--
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


"Joachim" wrote:
I know how to detect when a network cable has been plugged in or out, but how
can I detect when an IP address has been received through DHCP? I e how to
detect when the small "connecting to network" icon in the notification area
beside the clock turns to a "connected to network" icon?
Oct 31 '06 #2

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

Similar topics

11
20761
by: Adam Parkin | last post by:
Hello all, I need to be able to detect if there is an active available Internet connection in my VB6 program. In my program I'm using the Internet Transfer Control to transfer some files by HTTP, but as it stands now, there's no code to detect if there is in fact a network connection available before I try sending. Is there some easy way...
3
15116
by: James Yang | last post by:
Hi, I am using Sockets to connect to a remote computer and send data using Socket.Send() and receive using Socket.Receive() (block mode) . for somereason tho, when the client disconnects the Socket.Receive() just passes without any exception. Is there any way to detect disconnection using Sockets? I believe I saw a way of doing this...
3
11256
by: Scott Leonard | last post by:
Hello - I'm writing an application that will be used on "sometimes connected" devices (laptops, tablets). In C#, what is the best way to detect whether a network connection is present? I'd rather not rely on a network request timing out - the detection process must be very quick. Thanks in advance,
1
1799
by: Kunal | last post by:
I am developing a Windows Forms application that will need to check the status of the various network devices installed on the host machine. The machine in question is a Tablet PC (Tablet PC OS which is essentially XP with the whole ink superset etc), equipped with a sprint air card, a wireless card, and the docking station has a slot for a...
6
16634
by: Bruce Vander Werf | last post by:
I am using the asynchronous send/receive methods of the Socket class. When the remote end closes the socket, the callback for receive is called and EndReceive returns 0. Socket.Connected still returns true at this point, which I know is expected behavior, so when I reach this state, I begin sending on this socket every few seconds until...
3
1488
by: Elizabeth Harmon | last post by:
How can i detect if a user is connected to a newtork or the internet using ..Net? are there any examples out there? Any Help or links Greatly Appreciated TIA Samantha
2
1798
by: Brent Burkart | last post by:
I have a utility that I want to only run when a network connection is present. I want to plan for the situation when someone unplugs their laptop from the network and takes it into another room. My process requires a connection and I don't want it to blow up when one does not exist. I have tried using the "wininet.dll" API, but it still...
9
5557
by: timor.super | last post by:
Hi group, I've written a client/server application, using the dotnet sockets. In my server, I have a thread waiting for messages with : ret = currSocket.Receive(buffer, 1024, SocketFlags.None); When the client exits, I close the socket with a specific message (like "end") and the thread terminate in a proper manner, but If my client...
7
5649
by: BLUE | last post by:
Are there events that are fired when I insert the handheld into or I remove it from the cradle? *OpenNETCF.Desktop.Communication.ActiveSync* class has *Active* (indicates that a connection is established between the client application and the connection manager) and *Inactive* (indicates a disconnection, or disconnected state, between the...
0
7614
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
7924
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
8125
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
7676
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
6284
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...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.