Solved

How to know if I 'm connected ?

Posted on 1998-12-21
7
217 Views
Last Modified: 2010-04-04
I want to write an application like the microsoft tray icon...
0
Comment
Question by:seb24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 3

Expert Comment

by:williams2
ID: 1352359
Would you please be more specific? To know if you're connected to the internet needs RAS handling, which I can help you with, but to make a TrayIcon application is another matter but simple to do.

Regards,
Williams
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1352360
I think seb24 want to find whether the computer is connected via RAS, and then make a tray icon(if is connected).

So you can download the rascomp from http://www.magsys.co.uk/delphi/, in the example programm you can find all.

For making tray icons, there are so many components at DSP/Torry's/...

Regrads,
Wang
0
 

Author Comment

by:seb24
ID: 1352361
I shearch an api to know if I' m connected to internet...
The dwwang's answer seems good .
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:williams2
ID: 1352362
ok, Wang, let's see what you've got

Regards,
Williams
0
 
LVL 7

Expert Comment

by:jconde
ID: 1352363
If you mean if there's an internet connection available, you can't really know.

You can detect if there's a ras connection available, as well as an IP, but you can't know if you're connected to the Internet.

It's easier modem wise, but what happens if you're part of an Intranet?....you won't be able to know if you're connected unless you ping some out side server.  On the other hand, what would happen if you're behind a firewall?...
0
 
LVL 3

Expert Comment

by:williams2
ID: 1352364
You can do it by pinging a server, and there's no problems regarding to firewalls. The only problem is, that a connector from the outside will not be able to page you, but that is not the point. I can handle this without any problems at all.

If I was to do it, I would first test if there was a connection to an outside server. If that was not the case, I would go to some sort of sleep mode, where I would test the server if
1) I detected a RAS connection
2) Some time has passed by let's say 30 seconds.

Regards,
Williams
0
 
LVL 4

Accepted Solution

by:
dwwang earned 50 total points
ID: 1352365
>>"The dwwang's answer seems good"

Ok, so you mean you want to accept my answer? :-)

Well, the RAS component propsed above enumerates RAS connections avalable in the system, and judge wich one is active, just that.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question