Vmam,
In depends on the router you have and what you mean by connected. If you
just want to know if your router is connected to your isp, and you have
a router that has a web interface for administration, here one thing you
can do:
1.) Use the WebClient class to connect to your router's status page and
pull the html.
2.) Parse the html for some information that will tell you weather the
router is connected or disconnected. (You could look to see if your
router has a wan ip address from your isp or not...)
You may need to use regular expressions for this. (take a look at Regex
class)
3.) Based on what you find in the html, you can then place an icon in
the systray.
The Software Jedi at
http://www.thesoftwarejedi.com/ has several apps
that might help you. Take a look at Google Wallpaper. You might want to
download my version from here
http://deciacco.com/blog/archives/45 as I
updated it to work with some recent changes on google's site. I also
make use of regular expressions, which the original does not. This app
has code examples in it for everything you need to do, from putting an
icon in the systray to using the webclient, to regular expressions.
Post a comment on my site to let me know how it goes...would be
interested in seeing your app when you are finished.
Hope this helps...good luck!!
-----Original Message-----
From: VMAM [mailto:VM**@discussions.microsoft.com]
Posted At: Wednesday, January 31, 2007 9:39 AM
Posted To: microsoft.public.dotnet.languages.csharp
Conversation: Router state
Subject: Router state
Hi,
I have a home network with a DSL router. I want to check the router
state
(connected, disconnected...) from an XP computer on the network by
showing an
icon (green / red) in the system tray.
I am new in C# and I am checking for some hints on how to do it. Thanks!
VMAM