unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, AppEvnts, StdCtrls;
type
TForm1 = class(TForm)
ApplicationEvents1: TApplicationEvents;
Memo1: TMemo;
procedure ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
case Msg.message of
WM_LBUTTONDOWN:
begin
postmessage(screen.ActiveControl.Handle, wm_keydown, vk_return, vk_return);
// keybd_event(vk_return,0,0,0);
Handled := true;
end;
end
end;
end.