G
Guest
I'm designing an application that will be run on LAN-connected desktop PCs,
and will also be run on laptops that may or may not be disconnected from the
LAN. The application also needs to continue functioning if the network goes
down.
Looking for code to determine if a LAN connection is present first led me to
Sysytem.Windows.Forms.SystemInformation.Network, but that appears to only
tell you if a valid NIC is in the machine.... worthless.
I next checked out the following API calls: IsConnected, GetConnectedState,
IsNetworkAlive and InternetGetConnectedState. All of those appear to only
tell you the LAN status at boot-up time. That won't work if users unplug, or
if the network goes down.
Windows has the ability to know when a LAN connection is present, because
the little icon in the taskbar shows the correct status. How can I get VB.Net
to be that aware? I'd be happy to query whatever data drives the little
taskbar icon, if I have to...
Thanks,
Matt
and will also be run on laptops that may or may not be disconnected from the
LAN. The application also needs to continue functioning if the network goes
down.
Looking for code to determine if a LAN connection is present first led me to
Sysytem.Windows.Forms.SystemInformation.Network, but that appears to only
tell you if a valid NIC is in the machine.... worthless.
I next checked out the following API calls: IsConnected, GetConnectedState,
IsNetworkAlive and InternetGetConnectedState. All of those appear to only
tell you the LAN status at boot-up time. That won't work if users unplug, or
if the network goes down.
Windows has the ability to know when a LAN connection is present, because
the little icon in the taskbar shows the correct status. How can I get VB.Net
to be that aware? I'd be happy to query whatever data drives the little
taskbar icon, if I have to...
Thanks,
Matt