Autor Beitrag
Fabian
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 42



BeitragVerfasst: Di 23.07.02 20:18 
Hallo,
Gibt es eine Möglichkeit einen Link auf eine Internetseite oder E-mail Addresse in mein Formular einzubinden ?
b.brecht
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Di 23.07.02 20:23 
Jopp klar:

Code by "czrx"
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:
uses 
  ShellAPI, Registry; 

procedure OpenURL(Url: string); 
var 
  ts: string; 
begin 
  with TRegistry.Create do 
    try 
      rootkey := HKEY_CLASSES_ROOT; 
      OpenKey('\htmlfile\shell\open\command', False); 
      try 
        ts := ReadString(''); 
      except 
        ts := ''; 
      end; 
      CloseKey; 
    finally 
      Free; 
    end; 
  if ts = '' then Exit; 
  // remove quotes and commandline parameters 
  ts := Copy(ts, Pos('"', ts) + 1, Length(ts)); 
  ts := Copy(ts, 1, Pos('"', ts) - 1); 
  ShellExecute(0, 'open', PChar(ts), PChar(url), nil, SW_SHOW); 
end; 

procedure TForm1.Button1Click(Sender: TObject); 
begin 
  OpenURL('http://www.SwissDelphiCenter.ch'); 
end;
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Di 23.07.02 21:01 
Oder du verwendest einfach ShellExecute:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
ShellExecute(Application.Handle,
               'open',
               PChar('http://www.oitmann.de/meineprogs'),
               PChar(''),
               pChar(''),
               SW_SHOW);
ShellExecute(Application.Handle,
               'open',
               PChar('mailto:ich@da.de'),
               PChar(''),
               pChar(''),
               SW_SHOW);


Gruß
Klabautermann
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Sa 27.07.02 01:33 
bei klabautermanns beispiel aber auch ShellAPI in die uses-klausel aufnehmen

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce