473,503 Members | 2,105 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 2114
Try InternetCheckConnection 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
20751
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,...
3
15100
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...
3
11251
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...
1
1795
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...
6
16622
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...
3
1472
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
1795
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...
9
5546
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,...
7
5641
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...
0
7204
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,...
0
7091
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...
0
7282
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,...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5586
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,...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
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...

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.