473,395 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Jan 31 '07 #1
3 2955
Detecting the state depends on many things.
If you are lucky, the NetworkChange class could work for you.

"VMAM" <VM**@discussions.microsoft.comha scritto nel messaggio
news:D7**********************************@microsof t.com...
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

Jan 31 '07 #2
Laura T. <LT@NOWHERE.COMwrote in message
<e$**************@TK2MSFTNGP06.phx.gbl>:
>Detecting the state depends on many things.
If you are lucky, the NetworkChange class could work for you.

"VMAM" <VM**@discussions.microsoft.comha scritto nel messaggio
news:D7**********************************@microso ft.com...
>>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
some also may be accessible via SNMP

--
Brad Prendergast
"Wars have never hurt anybody except the people who die." -- Salvador
Dali (1904 - 1989)
Jan 31 '07 #3
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

Jan 31 '07 #4

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

Similar topics

16
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my...
6
by: John J. Hughes II | last post by:
My code starts a TCP/IP socket listener and waits for incoming connections. This works fine on my system and my test system but I have a customer who say it does not work on their system. As far...
2
by: cyshao | last post by:
How to reset Router by programing? For some resean, we need usually reset our Router. Now, we have to Reset Router manually(shot down and reopen). Are there any method to control and reset...
3
by: steve | last post by:
anyone know how to get a network router's external ip address? any examples w/b great! tia, steve
0
by: John | last post by:
Today something weird happened: I bought myself a new wireless router for home, got it set up, and everything was great. Browsing, email, even Shareaza p2p. Until I tried to use the ASP.NET 2...
0
by: mario.lat_ | last post by:
Hallo to all, I have write a little script for connecting to cisco router BUT I have a problem: I have to send to router all the commands and then I have to read the output. If I send a command1...
5
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service...
0
by: =?Utf-8?B?Sm9uYXRoYW4gU3RlaW5iZXJn?= | last post by:
I am looking at using the rotuer sample that comes with the samples in the Vista sdk (Microsoft SDKs\Windows\v6.0\Samples\WCFSamples\TechnologySamples\Scenario\Router\CS\router) I am using...
3
by: apg018 | last post by:
Hi - I just bought an Asus laptop with wireless capabilities. I have a desktop that I've used for years that is hooked up to Cox cable for high speed internet through a Motorola SG5120 cable modem....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
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...
0
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...
0
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
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,...

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.