Autor Beitrag
Primusio
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Sa 31.01.04 12:01 
Hi, nur kurz eine kleine Frage.

Ich möchte einen Hyperlink aufrufen, wenn ich auf eine dbTextkomponente klicke. allerdings soll der Inhalt dieser Variable ein Teil des Links sein, kann mir jemand bitte kurz helfen ?

Bei einem Label würde es ja in etwa so aussehen:
ausblenden Quelltext
1:
ShellExecute(handle, 'open','http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item='+lbl_auktnr.,nil,nil,SW_SHOW);					


Aber wie bekomm eich den Inhalt des dbTextfledes dahin ?


Wäre nett wenn mir jemand antworten könnten.

MfG
Primusio
tomtom62
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 278

WIN 2000, XP prof
D5 prof.
BeitragVerfasst: Sa 31.01.04 13:16 
ausblenden Delphi-Quelltext
1:
ShellExecute(handle, 'open','http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item='+Tabelle1.FieldByName('Feldname').asString,nil,nil,SW_SHOW);					
Primusio Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Sa 31.01.04 14:14 
Erst einmal vielen dank für die schnelle Antwort.

Aber wenn ich diese Zeile:
Zitat:
ShellExecute(handle, 'open','http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item='+ ZTable_aukt.FieldByName('auktnr').AsString,nil,nil,SW_SHOW);


Eingebe sagt er mir: Incompatible types: 'String' and 'PAnsiChar'

Woran kann das liegen ?


MfG
Primusio
tomtom62
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 278

WIN 2000, XP prof
D5 prof.
BeitragVerfasst: Sa 31.01.04 14:30 
Die Funktion erwartet ein PChar und Du lieferst einen String. Sorry, mein Fehler :cry:

ausblenden Delphi-Quelltext
1:
ShellExecute(handle, 'open','http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item='+ pchar(ZTable_aukt.FieldByName('auktnr').AsString),nil,nil,SW_SHOW);					


Ist auf die harte Tour, aber funktioniert...
:wink:
Primusio Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Sa 31.01.04 15:03 
Macht ja nix, kann doch mal passieren.

Nur habe ich jetzt deine neue Zeile genommen aber er sagt mir genau das selbe und der Curser springt auch immer hinter die table-Anweisung.
tomtom62
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 278

WIN 2000, XP prof
D5 prof.
BeitragVerfasst: Sa 31.01.04 17:38 
Da ist der Compiler aber kleinlich :roll:

Dann so:

ausblenden Delphi-Quelltext
1:
ShellExecute(handle, 'open',pchar('http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item='+ ZTable_aukt.FieldByName('auktnr').AsString),nil,nil,SW_SHOW);					
Primusio Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Sa 31.01.04 17:49 
Super jetzt geht es, vielen dank nochmal.

MfG
Primusio