Solved

How to know if I 'm connected ?

Posted on 1998-12-21
7
216 Views
Last Modified: 2010-04-04
I want to write an application like the microsoft tray icon...
0
Comment
Question by:seb24
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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Process Javascript errors with Delphi TWebBrowser 1 178
QRReport  TQrmemo vertical stretching 1 53
Create a path if not exists 7 92
Tvertscrollbox like a whatsapp layout 5 36
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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