corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Software Day: I need help writing a tiny program


New Topic

New Poll
  <<  1    2  >> Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Software Day: I need help writing a tiny program
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
   6th Oct 09 at 14:15   View Garage View User's Profile U2U Member Reply With Quote

I need some help with this, I'm not a software developer!

I need a tiny little program for XP/Vista that sits in the system tray and simply is red when the internet is not connected (can be circle, square, whatever) and green when it is connected.

My idea behind it is to use the ping command, ping a very reliabe website on the internet (bbc, google etc) and if there is a responce, green. If error, red.

Where do I start?

paul.mitchell1984
Member

Registered: 31st Aug 06
Location: Wakefield
User status: Offline
6th Oct 09 at 14:32   View User's Profile U2U Member Reply With Quote

are you using a laptop on wirless? if so why do you need this as theres a wireless icon in menu.
John
Member

Registered: 30th Jun 03
User status: Offline
6th Oct 09 at 14:33   View User's Profile U2U Member Reply With Quote

There will 100% be a program to do this I jus haven't found it yet.
Sam
Moderator
Premium Member


Registered: 24th Dec 99
Location: West Midlands
User status: Offline
6th Oct 09 at 14:34   View User's Profile U2U Member Reply With Quote

I think he wants to know if his DNS is working or not rather than his actual net connection if you see what I mean.
Sam
Moderator
Premium Member


Registered: 24th Dec 99
Location: West Midlands
User status: Offline
6th Oct 09 at 14:34   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by John
There will 100% be a program to do this I jus haven't found it yet.


I found one but it was last updated in 2001...
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
6th Oct 09 at 14:41   View Garage View User's Profile U2U Member Reply With Quote

No, I need it to see if the computer is connected to the internet, not a network.

Not fussed if it's done on DNS name (www.bbc.co.uk) or IP address (1.2.3.4)

Sam, link?
Sam
Moderator
Premium Member


Registered: 24th Dec 99
Location: West Midlands
User status: Offline
6th Oct 09 at 15:00   View User's Profile U2U Member Reply With Quote

http://www.moxom-software.co.uk/default.htm
Paul_J
Member

Registered: 6th Jun 02
Location: London
User status: Offline
6th Oct 09 at 17:59   View User's Profile U2U Member Reply With Quote

I can knock this up for you in minutes if you still want it pow.
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
7th Oct 09 at 07:39   View Garage View User's Profile U2U Member Reply With Quote

Paul - would be fantastic, what Sam showed me was brilliant but ideally I need the "icon" in the tray to be bigger, ie a circle the whole icon size that is filled red when the ping fails, green when it is a success, updated every say 10 seconds?
_Allan_
Member

Registered: 24th Mar 04
User status: Offline
7th Oct 09 at 07:47   View User's Profile U2U Member Reply With Quote

I need a similar app please gents, if someone can russle one up.

I have an O2 Wireless III router that after some idle time the DNS seems to fail. Although the laptops are still connected to the router the internet addresses cannot be resolved. It takes a reboot to work again. I've changed the DNS to use Open DNS servers but still no change. The box seems to fail after being idle. If the net is constantly being used it is fine. I could do with the app to test the DNS regularly.
Sam
Moderator
Premium Member


Registered: 24th Dec 99
Location: West Midlands
User status: Offline
7th Oct 09 at 08:04   View User's Profile U2U Member Reply With Quote

Allan - tell O2 about it, they can log in to your router remotely and sort anything that needs sorting in the settings for it.
Paul_J
Member

Registered: 6th Jun 02
Location: London
User status: Offline
7th Oct 09 at 08:10   View User's Profile U2U Member Reply With Quote

ok, i'll have to wait till tonight really - but i'll do it later.
DaveyLC
Member

Registered: 8th Oct 08
Location: Berkshire
User status: Offline
7th Oct 09 at 08:34   View User's Profile U2U Member Reply With Quote

Here you go POW

http://www.dohc.co.uk/temp/corsa/Pows%20Internet%20Monitor.zip

It pings google.co.uk every 30 seconds, and will display a balloon tip if there is no response.

For anyone who might be interested heres the ping code:

Ping pingSender = new Ping();
PingOptions pingOptions = new PingOptions();
PingReply pingReply = pingSender.Send("google.co.uk");

if (pingReply.Status != IPStatus.Success)

{
notifyIcon.BalloonTipText = "POW, THERE IS NO INTERNET!";
notifyIcon.ShowBalloonTip(30000);
}


You need to use the System.Net.NetworkInformation resource.



[Edited on 07-10-2009 by DaveyLC]
_Allan_
Member

Registered: 24th Mar 04
User status: Offline
7th Oct 09 at 09:18   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Sam
Allan - tell O2 about it, they can log in to your router remotely and sort anything that needs sorting in the settings for it.


Yeah I thought about that but I have SuperUser access and have checked all the settings. Nothing is in that would account for this. I'm pretty sure it's a bit of a dodgy box but it is a temporary replacement anyway and can't be arsed getting another one off them. I will have a look at Davey's app

[Edited on 07-10-2009 by _Allan_]
willay
Moderator
Organiser: South East, National Events
Premium Member


Avatar

Registered: 10th Nov 02
Location: Roydon, Essex
User status: Offline
7th Oct 09 at 09:20   View Garage View User's Profile U2U Member Reply With Quote

quote:
Originally posted by _Allan_
I need a similar app please gents, if someone can russle one up.

I have an O2 Wireless III router that after some idle time the DNS seems to fail. Although the laptops are still connected to the router the internet addresses cannot be resolved. It takes a reboot to work again. I've changed the DNS to use Open DNS servers but still no change. The box seems to fail after being idle. If the net is constantly being used it is fine. I could do with the app to test the DNS regularly.


What were you using for DNS? your O2 Router?
_Allan_
Member

Registered: 24th Mar 04
User status: Offline
7th Oct 09 at 09:25   View User's Profile U2U Member Reply With Quote

Yeah but I have the O2 router set to use Open DNS servers. It works fine on my Wireless II box at home. This box is in the gf's.
It makes no difference if Open or O2 servers are used. The DHCP lease time is default to 24 hours and cannot be changed.
That's about as much as I can work out.
willay
Moderator
Organiser: South East, National Events
Premium Member


Avatar

Registered: 10th Nov 02
Location: Roydon, Essex
User status: Offline
7th Oct 09 at 09:43   View Garage View User's Profile U2U Member Reply With Quote

heh change the DNS settings on your machines to use OpenDNS or O2's DNS servers instead of the actual router.
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
7th Oct 09 at 10:03   View Garage View User's Profile U2U Member Reply With Quote

The only problem with that willay is then you can't resolve to other computers with dns names inside the network?
willay
Moderator
Organiser: South East, National Events
Premium Member


Avatar

Registered: 10th Nov 02
Location: Roydon, Essex
User status: Offline
7th Oct 09 at 10:05   View Garage View User's Profile U2U Member Reply With Quote

a) I would presume thats not a problem for a network that has a o2 adsl router at the top

b) Netbios does COMPUTER NAME res, can use 'ping -a 1.1.1.1' to resolve ip addresses to names on your local subnet.
_Allan_
Member

Registered: 24th Mar 04
User status: Offline
7th Oct 09 at 11:44   View User's Profile U2U Member Reply With Quote

I'll give it a try. Thanks.
John
Member

Registered: 30th Jun 03
User status: Offline
7th Oct 09 at 11:54   View User's Profile U2U Member Reply With Quote

Can you set the DNS servers on the wireless box 3 with superuser?

I've got o2 and my router gives out the open dns ip's but I've not got an o2 router.
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
7th Oct 09 at 12:52   View Garage View User's Profile U2U Member Reply With Quote

Davey da man
DaveyLC
Member

Registered: 8th Oct 08
Location: Berkshire
User status: Offline
7th Oct 09 at 15:14   View User's Profile U2U Member Reply With Quote

No probs
oceansoul
Member

Registered: 19th Jun 06
Location: Sunbury, Surrey
User status: Offline
7th Oct 09 at 17:33   View User's Profile U2U Member Reply With Quote

Doesnt Vista do this? i.e. on the networked computers icon there is a lil globe that appears when connected to net
DaveyLC
Member

Registered: 8th Oct 08
Location: Berkshire
User status: Offline
7th Oct 09 at 18:01   View User's Profile U2U Member Reply With Quote

Yeah vista and windows 7 does it, but its for his Nan who uses XP.

  <<  1    2  >>
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
erm help cd writing question Adam-D Geek Day 17 1128
25th Dec 03 at 20:14
by Drew
 
windows 3.11 C2RL R Geek Day 29 1683
3rd Nov 10 at 18:52
by Ian
 
Nokia USB cable + software trouble!!! MoNkEy MaGiC Geek Day 8 1247
24th Jun 04 at 23:49
by Munchie
 
N95 8gb Software Upgrade Doug Geek Day 8 821
13th Mar 08 at 23:54
by _Allan_
 
FTP software that schedules uploads Sam Geek Day 5 444
28th Nov 08 at 10:40
by Sam
 

Corsa Sport » Message Board » Off Day » Geek Day » Software Day: I need help writing a tiny program 28 database queries in 0.1966150 seconds