Autor Beitrag
V!P3R
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151



BeitragVerfasst: So 14.10.07 18:35 
hallo,

die frage ist eigentlich ganz einfach

ich habe einen button: name: 'Button1'

wenn man da drauf klickt, soll man auf eine Internetseite gelinkt werden :
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure Tdate.Button1Click(Sender: TObject);
begin
//'www.delphi-forum.de'
end;


wie mache ich das?


MfG
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 14.10.07 18:43 
Hallo und :welcome: in der Entwickler-Ecke!

Das geht einfach so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
uses ShellApi;

//...

ShellExecute(Handle, 'open''http://www.delphi-forum.de'nilnil, SW_SHOW);

_________________
We are, we were and will not be.
V!P3R Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151



BeitragVerfasst: So 14.10.07 19:11 
Titel: geht nicht
das geht nicht, ich wei s zwa nich warum, aber es geht nicht

ich habe oben hingeschrieben:
ausblenden Delphi-Quelltext
1:
uses ShellApi;					


und beim button:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure Tdate.Button2Click(Sender: TObject);
begin
ShellExecute(Handle, 'open''http://www.delphi-forum.de'nilnil, SW_SHOW);
end;

aber es geht nicht

bitte um hilfe

MfG
V!P3R Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151



BeitragVerfasst: So 14.10.07 19:38 
Titel: kay
okay, jez hats geklappt, ich habe folgendes geschrieben:

ausblenden Delphi-Quelltext
1:
ShellExecute(0'open', PChar('firefox.exe'), PChar('http://www.delphi-forum.de'), nil, SW_SHOW);					



MfG
#Crasher
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23

Win 95, Win 98, Win NT, Win XP (used), Win Vista
D3, D4, D6, D7, D2005, BDS2006 Arch. UPD2
BeitragVerfasst: So 14.10.07 19:48 
Die erste Variante hätte auch funktioniert, wenn es
ausblenden Delphi-Quelltext
1:
ShellExecute(Handle, 'open', PChar('http://www.delphi-forum.de'), nilnil, SW_SHOW);					

statt
ausblenden Delphi-Quelltext
1:
ShellExecute(Handle, 'open''http://www.delphi-forum.de'nilnil, SW_SHOW);					

heißen würde...

Greetz Crasher