Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-07

LCLMessageGlue Example

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Fabio Luis Girardi

Hi!!

Looking to this page (http://wiki.freepascal.org/LCL_Tips) I found a item called "Simulating Mouse and Keyboard input".

I don't found any example about LCLMessageGlue unit. I tried too the following code (on a form with a TEdit called Edit1), that tries insert the "a" character on Edit1:

implementation
uses LCLMessageGlue, LCLType;
{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
var
  akey: Word;
begin
  akey:=VK_A;
  LCLSendKeyDownEvent(Edit1,akey,0,false,True);
  //Sleep(100);
  LCLSendKeyUpEvent(Edit1,akey,0,false,True);
end;

Some ideas?

The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130727/3a8588b1/attachment.html>

Reply by email