Ver Mensaje Individual
  #1  
Antiguo 17-12-2005
Avatar de gluglu
[gluglu] gluglu is offline
Miembro Premium
 
Registrado: sep 2004
Ubicación: Málaga - España
Posts: 1.455
Reputación: 21
gluglu Va por buen camino
Ctrl-Intro en un TEdit

Hola Amigos !

En mi TEdit controlo tanto los eventes OnKeyDown como OnKeyPress. Quiero interceptar cuando el usuario pulsa Ctrl-Intro y lo hago bien con
Código Delphi [-]
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  If (Key = VK_RETURN) and (Shift = [ssCtrl]) Then
    ...
end;
pero aunque añada Key := 0;, después de pasar por OnKeyDown me ejecuta también OnKeyPress y ahí no sé como identificar esa situación, ya que en OnKeyPress, Key no vale ni 17 (Control) ni tampoco 13 (Enter) y shift no está disponible.

Felices Fiestas !
__________________
Piensa siempre en positivo !
Responder Con Cita