Search results for 'Windows Message Example'. 1 post(s) found.

  1. 2007/09/25 How to send char as message to another application
2007/09/25 14:17

How to send char as message to another application


The following code is used to insert a character into another application - Notepad.

procedure TForm1.Button1Click(Sender: TObject) ;
var g,d:integer;
begin
  {Find the main window of the Application}
  g:=FindWindow('Notepad',nil) ;
  {Find the window of the application's text box}
  d:=ChildWindowFromPoint(g,point(50,50)) ;
  {Now send it a character!!}
  SendMessage(d,WM_CHAR,Ord('A'),0) ;
end;
Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 03:54 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 12:46 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:41 delete

    moneyideas