Autor Beitrag
max120b
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WinXP, Linux 9.0
Delphi 2005 Professional
BeitragVerfasst: Di 26.12.06 01:09 
Hallo zusammen.

Ich hab mir über die Feiertage ein kleines Programm geschrieben, mithilfe dessen man sich Hotkeys definieren kann die dann andere Programme ohne eigene Hotkeys "fernsteuern". Ich habe mir auf meinem Formular mehrere Hotkey-Felder angelegt. Das eingeben und nutzen der Hotkeys funktioniert einwandfrei, jedoch möchte ich die Möglichkeit einbauen, die Hotkeys zu speichern. Und da ligt mein Problem...

die Hotkey-Komponente stellt einen Datentyp ShortCut bereit. Die darin enthaltenen Daten möchte ich als String in einer StringList ablegen. Nur wie bekomme ich nun den ShortCut in einen Text-Typ umgewandelt, oder geht sowas überhaupt?

Die SuFu hab ich schon bemüht. Hab auch jede Menge zu Hotkeys gefunden, aber leider nicht wie man sie abspeichern kann :(

Danke schonmal im Voraus


Max120b
ich1506
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 49

Win XP, Win 98, Win 2000, Eisfair
Delphi 5 Enterp
BeitragVerfasst: Di 26.12.06 02:11 
Ich glaube du suchst das hier:

ShortCutToText

(Wenn es das ist, hast nu nicht die Suchenfunktion von Delphi gefragt!)
max120b Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WinXP, Linux 9.0
Delphi 2005 Professional
BeitragVerfasst: Mi 27.12.06 20:51 
Den Befehl hab ich schon ausprobiert...

Hier ein Beispielcode:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1Click(Sender: TObject);
var c:string;
begin
c:=ShortCutToText(Hotkey1.HotKey);
end;


Daraufhin meldet sich mein Delphi sofort mit:

[Fehler] Unit1.pas(30): E2003 Undefinierter Bezeichner: 'ShortCutToText'

:(

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Mi 27.12.06 20:59 
Ich glaub Uses Menus musst mal probieren.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
max120b Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WinXP, Linux 9.0
Delphi 2005 Professional
BeitragVerfasst: Sa 30.12.06 20:14 
Danke mit der uses menus hats gefunzt ^^


THX

Max120b