unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure MyMessage(var Msg: TMsg;var Handled: Boolean);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
application.OnMessage:=MyMessage;
end;
procedure TForm1.MyMessage(var Msg: TMsg; var Handled: Boolean);
begin
if ((msg.message=wm_keydown) or (msg.message=wm_keyUP))
and (MSG.wParam =vk_delete) then
begin
showmessage('VK_DELETE');
handled:=true;
end;
end;
end.