Autor Beitrag
Jagg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Di 02.07.02 08:17 
Hallo,Leute !
Ich möchte einen Link erstellen,wie im Internet !
Ihr wisst schon,wenn man im Internet auf ein Wort,geht dann verändert sich der Mauszeiger zu einer Hand und beim Klick darauf,öffnet sich dann der Link !

Wie erstelle ich sowas unter Delphi ???

Jagg !
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 02.07.02 08:57 
Solche Komponenten (meistens von tLabel abgeleitet) gibt es einige auf [url=www.torry.net]Torry[/url].

Gruß
Torsten
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 160



BeitragVerfasst: Di 02.07.02 13:31 
Moinsen!

Es geht auch mit den normalen Komponenten von Delphi.
Hier ein kleines Beispiel.
Benötigt wird lediglich TStaticText.

Hier die OnClick-Methode:
ausblenden Quelltext
1:
2:
3:
4:
procedure TForm2.StaticText2Click(Sender: TObject);
begin
 ShellExecute(handle,'open','http://www.madbweb.de',nil,nil,sw_show);
end;


Und nun das Beispiel für den Mauszeiger:
ausblenden Quelltext
1:
2:
3:
4:
5:
procedure TForm2.StaticText2MouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
begin
 TForm2(Sender).Cursor:=crHandPoint;      
end;


Grüße

Torsten
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 04.07.02 16:04 
Bei mir erkennt er kein shellexecute,waran liegt das ?
muss ich nochwas hinzufügen ????

Jagg !
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Do 04.07.02 16:08 
Uses ShellApi !
Torsten
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 160



BeitragVerfasst: Do 04.07.02 16:12 
Oh ja, natürlich.
Sorry, hatte ich vergessen anzugeben. Ich dachte, das wäre bei ShellExecute klar.

Grüße

Torsten
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 04.07.02 16:17 
Dabei will ich aber das dabei ein neues Formular geöffnet wird und nicht ein Website !
wie mache ich das ?

Jagg !
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 04.07.02 16:51 
Wäre schon wenn Du in Zukunft Deine Fragen etwas genauer beschreibst dann wäre Dein Problem längst gelöst :-D

Damit also ein weiteres Forumlar angezeigt wird musst die Procedure StaticText2Click durch den hier ersetzen:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm2.StaticText2Click(Sender: TObject); 
begin 
  Form3.ShowModal;
  // oder
  Form3.Show;
end;
Gruß