In this sample that was provided, the VFP application is being stuffed into the .NET application. So it is about window handle management. The easiest solution here is to just force the focus back over to the .NET application anytime the mouse is over the toolstrip.
If that doesn't work then you can use a Windows API to force the focus back as well. Let me know if you need more detail.
I like that sample vfp, .net interop application that you made available. I have one question though. I noticed when I run the sample on my machine, once everything has initialized, I have to click the VFP form button, twice before the form pops up. After that I only need to click it once and it pops up.
I've been trying to trace the problem, but it seems like the sendmessage function sends the message out fine, but the VFP udp object never receives the message.
I know that first, I have to click on the main form to put the focus on it, and then click on the button. But again, once the form has focus, only the very first time, I have to click the button twice to get the form to pop up.
Am I missing something (besides some marbles?)
Thanks,
Marcel