: : : Suppose if I send a message from one application,
: : : how can the other application receive the message that I send.
: : : I can use SendMessage API to send a message.
: : : What should I use to receive a Message.
: : :
: : : From Application1,I use
: : :
: : : const WM_MYMESSAGE WM_APP+$200
: : : SendMessage(appHandle,WM_MYMESSAGE,0,0);
: : :
: : : What should be written in Application2 to receive this message.
: : :
: : : Thanks for your replies.
: : :
: : You need to write an OnMessage() event for the application.
: :
:
: Can you kindly give a sample piece of code,what to write
: in OnMessage() event.I haven't used Message Handling.
: Thanks Zibadian.
:
:
procedure TForm1.OnMessage(var Msg: TMsg; var Handled: Boolean);
begin
if Msg.Message = WM_MYMESSAGE then
begin
DoSomething(Msg.wParam, Msg.lParam);
Handled := true;
end;
end;