General information
Category:
Windows API functions
Title:
Fire an event in one VFP program from another VFP program
I have a button in FoxPro Task1 that launches FoxPro Task2 (separate executables). If the user returns to FoxPro Task1 while Task2 is waiting for events, and presses the button again, I want to "activate" Task2: that is, I want to bring Task2 to the top of the ZOrder and fire some event in Task2 (preferably the form's Activate event).
I can use SetForegroundWindow() to bring the window to the top of the ZOrder, but no event is fired. Notably, if I use Alt-Tab to switch context between Task1 and Task2, no event fires in Task2. I suspect that if I solve the problem for Alt-Tab I will also have solved it for SetForegroundWindow().
Is there a FoxPro event in the target window that fires when SetForegroundWindow() is executed? Alternatively, is there a way with VFP 7 that I can capture the apropriate Windows event?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only