Autor Beitrag
deagle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 89



BeitragVerfasst: Sa 09.11.02 19:25 
Hallo, ich wollte ein Programm machen das die Daten von DFÜ-Verbingung liest und die dan anwählt und wenn der die Verbindung hergestellt hat soll der den IE öffnen!!

Wie macht man das?

D-Ealge
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Sa 09.11.02 20:06 
hi,

such mal bei torry nach TDialUp. Damit kannste DFÜ-Daten auslesen und auch Verbindungen herstellen. Den IE kannste mit ShellExecute und CreateProcess starten.

_________________
Viele Grüße
Jakob
bis11
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1247
Erhaltene Danke: 2

Apple Mac OSX 10.11

BeitragVerfasst: So 10.11.02 10:28 
Hi,

ich habe noch eine möglichkeit, wie Du es ohne Komponente machen kannst. Funktioniert allerdings nur unter Windows NT/2000 und vielleicht, weil noch nicht getestet unter Windows XP.

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
unit Unit1;

{ This unit shows how you can establish a connection to the internet without any
  user interaction.}
{ Diese Unit zeigt, wie eine Verbindung zum Internet aufgebaut werden kann, ohne
  dass der Benutzer eingreifen muss.}

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    edtEntry: TEdit;  // holds the name of the connection, e.g. 'bluewin'
    edtUser: TEdit;   // the username for the above connection
    edtPass: TEdit;   // and the password
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses shellapi;
{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  cmd, par, fil, dir: PChar;
begin
  // establish the connection
  // die Verbindung aufbauen
  // rasdial.exe entryname username password
  cmd := 'open';
  fil := 'rasdial.exe';
  par := PChar(edtEntry.Text + ' ' + edtUser.Text + ' ' + edtPass.Text);
  dir := 'C:';
  // call rasdial.exe with Shellexecute
  // rasdial mit Shellexecute aufrufen
  ShellExecute(Self.Handle, cmd, fil, par, dir, SW_SHOWMINNOACTIVE);
end;


procedure TForm1.Button2Click(Sender: TObject);
var
  cmd, par, fil, dir: PChar;
begin
  // disconnect the connection to the Internet
  // Verbindung zum Internet abbrechen
  cmd := 'open';
  fil := 'rasdial.exe';
  par := PChar(edtEntry.Text + ' /DISCONNECT');
  dir := 'C:';
  ShellExecute(Self.Handle, cmd, fil, par, dir, SW_SHOWMINNOACTIVE);
end;

end.


Habe ich mir mal notiert von einer der zahlreichen Delphi-Homepages. Dann den IE einfach mit shellexecute oder CreateProcess starten so wie es DeCodeGuru geschrieben hat.
deagle Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 89



BeitragVerfasst: So 10.11.02 16:02 
:D Danke

Aber dabei twigt der mir ein Fehler an!! ;(

edtEntry.Text is das nochne Komponete?
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: So 10.11.02 18:01 
Suchfunktion!!!

die frage mit dem ins internet verbinden wurde schon x-mal gefragt

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
waldmeister
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 136

Win XP
D7 Enterp
BeitragVerfasst: So 10.11.02 18:12 
Ich würde sagen, EDTentry.text sagt schon alles!!

EDT is ne kurzform für edit un somit is das ne komponente, nämlich en edit-feld!!

_________________
der wald....der meister....der meister des waldes....der waldmeister
deagle Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 89



BeitragVerfasst: So 10.11.02 19:56 
Entschuldigung !! Das ich gefragt habe!!

Der sagt immer : Feld Form.1edtPass besitzt keine entsprechende Komponente. Soll die Deklaration entfernt werden?



Was soll ich den machen damit das funzt? Das mit den edit feldern hat nicht geklappt!!

D-Eagle!
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Mo 11.11.02 11:58 
Hi
du brauchst insgesamt 3 EditFelder und zwei Buttons auf dem Formular.
edtEntry, edtUser, edtPass.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...