Add this external function to the background program:
Function long SendStringMessage ( long hWnd, uint Msg, Ref string wParam, ulong lParam ) Library "user32.dll" Alias For "SendMessageW"
Arg1 - The handle of the window that will receive the message
Arg2 - The event on the window that will receive the message
Arg3 - The string message
Arg4 - A number to pass or zero if not needed
On the foreground program's main window, you will have to add a pbm_custom## event. The message number passed to SendStringMessage will be 1023 + the pbm_custom number. For example, pbm_custom01 will be 1024, pbm_custom02 will be 1025, and so on.
In the custom event, add this:
String ls_msg
ls_msg = String(wparam, "address")
The message sent from the background program should be in ls_msg.
Is there a way to use WM_NOTIFY to communicate?
Thanks,
Olan