-
Dec 18th, 2017, 04:03 AM
#1
Thread Starter
Junior Member
Online / Offline Status Notice Board
Hi,
(I assume that this has been created already!)
I'm looking to create a program (style) application which continually checks for an online/offline status of a device (could be local or public) and to display a visual colour of green to show that the connection is alive & the time that it was last checked..
Not asking for someone to create this for me, just some help in the right direction?
-
Dec 18th, 2017, 04:12 AM
#2
Lively Member
Re: Online / Offline Status Notice Board
Try to ping an IP address or an URL
Code:
If My.Computer.Network.Ping("192.168.0.1") Then
MsgBox("Connection ok")
Else
MsgBox("No Connection")
End If
https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
Utterly useless, but always willing to help
As a finishing touch god created the dutch
-
Dec 18th, 2017, 12:37 PM
#3
Re: Online / Offline Status Notice Board
The hard part is "determining if the device is online/offline".
If you're lucky, it has some API-like way to query its status. If that's true, this project is as trivial as using that.
If you're not lucky, it doesn't. Then you have to figure out some way your program can do something that tells you if the thing is on or off. Goggy showed some code that can work, IF the device responds to ICMP pings. That's not guaranteed, and many devices don't. And you have to worry about all the usual suspects in terms of networking such as firewalls, outages, etc.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|