Ver Mensaje Individual
  #4  
Antiguo 12-10-2006
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Haciendo algunas pruebas, aun cuando el evento OnKeyDown sí detecta la tecla CONTROL, no parece evitar el CTRL-DEL aún poniendo Key := 0. Sin embargo, parece funcionar si lo que detectamos es la tecla DELETE con el modificador Ctrl:

Código Delphi [-]
procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if (Key = VK_DELETE) and (ssCtrl in Shift) then
    Key := 0;
end;

// Saludos
Responder Con Cita