﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » Strataframe, VFP interop question</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 03:13:08 GMT</lastBuildDate><ttl>20</ttl><item><title>Strataframe, VFP interop question</title><link>http://forum.strataframe.net/FindPost11921.aspx</link><description>Hi Guys,&lt;/P&gt;&lt;P&gt;I like that sample vfp, .net interop application that you made available. I have one question though.&amp;nbsp; I noticed when I run the sample on my machine, once everything has initialized, I have to click the VFP form button,&amp;nbsp;twice before the form pops up. After that I only need to click it once and it pops up.&lt;/P&gt;&lt;P&gt;I've been trying to trace the problem, but it seems like the&amp;nbsp;sendmessage function&amp;nbsp;sends the message out fine, but the VFP udp object never receives the message.&lt;/P&gt;&lt;P&gt;I know that first, I have to click on the main form to put the focus on it, and then click on the button.&amp;nbsp; But again, once the form has focus, only the very&amp;nbsp;first time, I have to click the button&amp;nbsp;twice to get the form to pop up.&lt;/P&gt;&lt;P&gt;Am I missing something (besides some marbles?)&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marcel</description><pubDate>Tue, 09 Oct 2007 10:10:41 GMT</pubDate><dc:creator>Marcel Heitlager</dc:creator></item><item><title>RE: Strataframe, VFP interop question</title><link>http://forum.strataframe.net/FindPost11924.aspx</link><description>Very good question!&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;In this sample that was provided, the VFP application is being stuffed into the .NET application.&amp;nbsp; So it is about window handle management.&amp;nbsp; The easiest solution here is to just force the focus back over to the .NET application anytime the mouse is over the toolstrip.&lt;/P&gt;&lt;P&gt;[codesnippet]MyMainForm.Focus()[/codesnippet]&lt;/P&gt;&lt;P&gt;If that doesn't work then you can use a Windows API to force the focus back as well.&amp;nbsp; Let me know if you need more detail. :)</description><pubDate>Tue, 09 Oct 2007 10:10:41 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>