Autor Beitrag
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 18.12.04 16:33 
gibt es ne möglichkeit in einem Edit das STRG-V abzufangen, vielleicht per OnKeyDown ?
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Sa 18.12.04 16:48 
mhm.. ja damit sollte es klappen, denke ich. das key down ereignis wird erst für strg ausgelöst. dann setzt du eine boolean variable auf true. dann prüfst du noch zusätzlich in key pressed
ausblenden Delphi-Quelltext
1:
2:
3:
if DieVariable then begin
 if key='v' then key=#0;
end;

das sollte klappen...
vergiss nicht in onkeyup DieVariable wieder auf false zu setzen, sonst drückt man einmal strg, und darf danach nie wieder 'v' schreiben... :D

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Sa 18.12.04 16:53 
ausblenden Delphi-Quelltext
1:
 if (ssCtrl in Shift) and (Key = Ord('v')) then  key := 0;					

So sollte es eigentlich funktionieren.
rochus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 416

Win XP Prof, Fedora Core 4, SuSE 7.0
D7 Ent, D2005 Pers
BeitragVerfasst: Sa 18.12.04 17:13 
@jasocul

damit erreichst du aber auch, dass z.B. ein strg+alt+v ebenso ein strg+v auslöst. besser wäre in dem fall:

ausblenden Delphi-Quelltext
1:
if (Shift = [ssCtrl]) and (Key = Ord('v')) then key := 0;					


gruß
rochus

_________________
Im Nachhinein ist man immer ein Schlauch!
"Dream as if you'll live forever, live as if you'll die today!" James Dean
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 18.12.04 17:20 
Und wie siehts mit Konetxtmenü aus ? Also rechte Maustaste und "einfügen" ?

_________________
Gruß
Hansa
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Sa 18.12.04 18:22 
bau dir selbst ein leeres context menü. habs ausprobiert. klappt.
die komponente heist popupmenu und muss auf die form gezogen werden. nun wählst du beim edit unter (rot geschrieben) popupmenu dein popupmenu1 aus und versuchst es mal.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.