

Compile and run two copies of your application and test it functionality. SendMessage(HWND_BROADCAST, WM_OURMESSAGE, Handle, Top) ħ. Procedure TForm1.Button1Click(Sender: TObject) WM_OURMESSAGE := RegisterWindowMessage('Our broadcast message') Add registration of your message that you could handle the HWND_BROADCAST messages: Label2.Caption := Format('Our another form top :%d', ) ĥ. Label1.Caption := Format('Our another form handle :%d', ) Procedure TForm1.WMMYMessage(var Msg: TWMMYMessage) Checking if this message is not from us Procedure TForm1.DefaultHandler(var Message) Insert realisation of DefaultHandler and our message handler methods: Procedure WMMYMessage(var Msg: TWMMYMessage) Ĥ. Procedure DefaultHandler(var Message) override

Override your form's DefaultHandler method and add method for handling your message, like this Info: LongInt // ( this is lParam, pointer to our data)Ģ. Handle: HWND // ( this is the wParam, Handle of sender) Msg: Cardinal // ( first is the message ID )

Define type of your message structure, it could be something like this: ZylAppCommunicator is a Delphi / C++Builder component which lets you to communicate between one or more applications which are running on the same computer. (In example below we will inform about our form's top position)ġ. We can use HWND_BROADCAST value for first parameter for SendMessage function for suppressing finding of forms' in other applications HANDLE.įor using HWND_BROADCAST we should register our messages in Windows.įor performing this you could make the following: The platform has achieved the basic function of sending and receiving. You can perform communication between your application using Windows messages exchange mechanism. The application of data communication system based on Delphi in field of education. Question: I want to perform communication between two my applications or between two instances of my application. Title: Communicating between your applications.
