Autor Beitrag
DelphiFreund
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 120

Win XP
D7 Enterprise
BeitragVerfasst: Sa 19.06.04 21:15 
Hi Leute,
ich brauche eure Hilfe, hab schon viel gesucht und probiert, bevor ich das hier schreibe.

Aber mit probieren geht wohl leider nicht alles.

Frage: Wie kann ich, mit KeyDown, 'Strg + E' als key benutzen?

(mit if key = (VK_Control + Ord('E')) geht's nicht)
KidPaddle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 351

WinXP,Linux
D7 Prof, XE7
BeitragVerfasst: So 20.06.04 09:11 
So geht das nicht. In Key steht das gedrückte Zeichen. Den Status der Sondertasten Shift, Strg, Alt kannst Du mit GetKeyState abfragen.

ausblenden Delphi-Quelltext
1:
2:
3:
  if ((GetKeyState(VK_LCONTROL) and $8000) > 0) and (Key = ...) then begin
    ...
  end;


In der Win SDK Hilfe stehen die Paramter und Rückgabewerte für diese Funktion.

Gruß
KidPaddle
DelphiFreund Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 120

Win XP
D7 Enterprise
BeitragVerfasst: So 20.06.04 10:47 
Was meinst du mit 'Win SDK Hilfe'? und was bedeutet '&8000'?
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: So 20.06.04 14:15 
so wie das aussieht, ist das wohl in OnKeyPRess oder so, nicht?

und da gibt es "Shift", also:

ausblenden Delphi-Quelltext
1:
if (ssCtrl in Shift) and (Key=Ord('E')) then ...					


Stefan

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: So 20.06.04 14:27 
DelphiFreund hat folgendes geschrieben:
Was meinst du mit 'Win SDK Hilfe'?
Damit ist sicherlich das Platform SDK (PSDK) gemeint.
Und die Online-Version ist die MSDN Library (IE-only :roll:)

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert