How to Emitting Event to Other Application


I have 2 photon applications of which, first application has the menu bar
on it. first photon application starts second application only for specific
reason for some time. from user point of view their is only one application
running in the system.

When the focus is on the second application user can not use the menu
located on the first application using keyboard.

When the focus is on the second application, to show the menu located on
the first application i want to capture the keyboard event on the second
application and if it is for staring menu, then pass the same to the first
application so the menu will be shown.

Keyboard event can be caught by using RAW callback. but how to forward the
same event to other application.

PhEventEmit() function requires region id of the window. how to find
region id of another application’s window?

PhForwardWindowTaskEvent() forwards event between two applications but it
is of not same type.

how to notify another application that some keyboard event has occured
through code?

please let me know if anybody has some information about this.

thanks in advance