Autor Beitrag
Flash106
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Di 29.03.05 18:26 
Hallo,

wie kann das löschen eines Zeichens durch das drücken der Entf - Taste unterbinden. Sie also sozusagen ignorieren. Es soll nicht passieren im Editfeld...
Danke
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Di 29.03.05 18:29 
ausblenden Delphi-Quelltext
1:
2:
3:
//Edit OnKeyPress:
if Key = #8 then
  Key := #0;


AXMD
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Di 29.03.05 18:33 
nein das ist es nicht...hab ja schon eine key überprüfung drin.. noch eine idee??
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Di 29.03.05 18:35 
user profile iconFlash106 hat folgendes geschrieben:
nein das ist es nicht...hab ja schon eine key überprüfung drin.. noch eine idee??


Natürlich funktioniert das... was hast du denn für Editfelder :lol:

AXMD
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Di 29.03.05 18:42 
kennst du den unterschied zwischen backspace und delete?! :wink:
ich will del bzw entf aufhalten nicht backspace...
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Di 29.03.05 18:43 
Dann fang in OnKeyUp/Down den entsprechenden virtuellen Keycode ab

AXMD
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 30.03.05 23:03 
OnKeyDown
ausblenden Delphi-Quelltext
1:
if Key=vk_DELETE then key:=vk_Space					

ersetze halt mit einer anderen Taste

user profile iconAXMD hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
//Edit OnKeyPress:
if Key = #8 then
  Key := #0;


AXMD
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: Mi 30.03.05 23:49 
oder im onkeypress:
ausblenden Delphi-Quelltext
1:
if ord(key) = vk_delete then key := #0;					

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...