> I want to fire an internet connection, i do not want my own dial up.
>
> I just want to bring the standard windows dial up box like when you click on
> IE.
>
> Is their some simple API call of is it easier to find a ras component?
>
> Thanks
>
> Ian
[code lang=”delphi”]//Add Wininet in uses list
//Declare these two as public…
HInet : HINTERNET ;
function InternetConnected: Boolean;
function TfrmMain.InternetConnected: Boolean;
CONST
INTERNET_CONNECTION_MODEM = 1; // local system uses a modem to connect to the Internet.
INTERNET_CONNECTION_LAN = 2; // local system uses a local area network to connect to the Internet.
//INTERNET_CONNECTION_PROXY = 4; // local system uses a proxy server to connect to the Internet.
INTERNET_CONNECTION_MODEM_BUSY = 8; // local system’s modem is busy with a non-Internet connection.
VAR
dwConnectionTypes : DWORD;
BEGIN
dwConnectionTypes := INTERNET_CONNECTION_MODEM + INTERNET_CONNECTION_LAN ;//+ INTERNET_CONNECTION_PROXY;
Result := InternetGetConnectedState(@dwConnectionTypes, 0);
end;
//check if user is already connected to internet and if not then it pops up with dialup box
if not InternetConnected then
begin
HInet := InternetOpen(‘Microsoft Internet Explorer’, INTERNET_OPEN_TYPE_DIRECT , Nil , Nil ,
INTERNET_FLAG_EXISTING_CONNECT );
InternetAutodial(INTERNET_AUTODIAL_FORCE_ONLINE,0);
end;
[/code]
[tags]Delphi, Internet[/tags]
0 Kommentare zu “bring up the standard windows dial up box”