Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to tell the type of Internet connection your PC is connected to. Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Findl the type of Internet connection. 22-Jan-04
Category
Internet / Web
Language
Delphi All Versions
Views
571
User Rating
6
# Votes
1
Replies
0
Publisher:
Darley, F. Joe
Reference URL:
			1   
2   { You must be connected to the internet and don't forget to add this 
3    unit to get it to work :-) }
4   
5   uses wininet;
6   
7   
8   function KindOfConnection :boolean;
9   var
10    flags: dword;
11  begin
12    Result := InternetGetConnectedState(@flags, 0);
13    if Result then
14    begin
15      if (flags and INTERNET_CONNECTION_MODEM) = INTERNET_CONNECTION_MODEM then
16      begin
17        showmessage('Modem');
18      end;
19      if (flags and INTERNET_CONNECTION_LAN) = INTERNET_CONNECTION_LAN then
20      begin
21        showmessage('LAN');
22      end;
23      if (flags and INTERNET_CONNECTION_PROXY) = INTERNET_CONNECTION_PROXY then
24      begin
25        showmessage('Proxy');
26      end;
27      if (flags and INTERNET_CONNECTION_MODEM_BUSY)=INTERNET_CONNECTION_MODEM_BUSY 
28  then
29      begin
30        showmessage('Modem Busy');
31      end;
32    end;
33  end;
34  
35  procedure TForm1.Button1Click(Sender: TObject);
36  begin
37     KindOfConnection;
38  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC