Einzelnen Beitrag anzeigen

XeRo

Registriert seit: 23. Okt 2003
Ort: Warth
461 Beiträge
 
Delphi 7 Enterprise
 
#2

Re: DFÜ-Standardfenster öffnen

  Alt 24. Okt 2003, 16:18
Ich nehm mal an, dass du eine Verbindung mit dem Internet erstellen möchtest...Wenn nicht dann sags!

Versuchs mal
Delphi-Quellcode:
uses
  WinInet;

// Causes the modem to automatically dial the default Internet connection.
procedure TForm1.Button1Click(Sender: TObject);
var
  dwConnectionTypes: DWORD;
begin
  dwConnectionTypes := INTERNET_CONNECTION_MODEM + INTERNET_CONNECTION_LAN +
    INTERNET_CONNECTION_PROXY;
  if not InternetGetConnectedState(@dwConnectionTypes, 0) then
    // not connected
    if not InternetAutodial(INTERNET_AUTODIAL_FORCE_ONLINE or
      INTERNET_AUTODIAL_FORCE_UNATTENDED, 0) then
    begin
      // error
    end;
end;


// hangup the default Internet connection.
procedure TForm1.Button2Click(Sender: TObject);
var
  dwConnectionTypes: DWORD;
begin
  dwConnectionTypes := INTERNET_CONNECTION_MODEM + INTERNET_CONNECTION_LAN +
    INTERNET_CONNECTION_PROXY;
  if InternetGetConnectedState(@dwConnectionTypes, 0) then
    // connected
    InternetAutodialHangup(0);
end;
  Mit Zitat antworten Zitat