I have the following need.
You could use Winsock. App2 would listen on a port and App1 would send the message.
https://www.topwizprogramming.com/freecode_winsock.html
Some other options
1) Using a database for messaging: App1 writes a message to the DB, App2 "listens" by regularly reading from the DB.
2) Using messaging software like IBM MQ
3) PTP software - years ago I did a project where we had to send messages to vehicles in a fleet from dispatching software. We used software called DART. When the vehicles would log in, they would register their ip in the database. The dispatcher app would determine which vehicle to send the message to, look up their ip in the db, and then send the message. Not sure what other PTP software vendors are out there, but it's another option.
Hi Gimmy;
Here is a working example of using both the PB Send() command and/or the SendMessageW API that achieves what your asking ...
http://chrispollach.blogspot.com/2019/11/sendmsg.html
HTH
Regards ... Chris
this describes the technique. i believe this is roland and chris from the old sap forum.
https://answers.sap.com/questions/12296328/triggering-a-user-event-in-pb-window-form-another-.html
iul_socket = gn_ws.of_Listen(lui_port, Handle(Parent), 1)