Strataframe, VFP interop question


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Very good question!  Actaully, this is something that we addressed by adding some code in the OnMouseOver event of the toolstrip that forces the focus back to the .NET application.

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.

MyMainForm.Focus()

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. Smile

Marcel Heitlager
Marcel Heitlager
StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)
Group: StrataFrame Users
Posts: 84, Visits: 835
Hi Guys,

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

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search