<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Forms appearing below Arcmap window in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463954#M12574</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;System.Windows.Forms.Form has members ShowDialog and Show which take IWin32Window as an argument.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Google on "hWnd IWin32Window".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Apr 2011 17:50:03 GMT</pubDate>
    <dc:creator>RichardWatson</dc:creator>
    <dc:date>2011-04-04T17:50:03Z</dc:date>
    <item>
      <title>Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463949#M12569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running Arcgis 10, coding in VB.Net with VS 2008.&amp;nbsp; One form that I try to show always comes to the front then the Arcmap window appears above it.&amp;nbsp; The Arcmap window disappears during processing time.&amp;nbsp; The form is called with Show().&amp;nbsp; ShowDialog() brings the form to the front but we need to give users access to the Arcmap window while the form is open.&amp;nbsp; I've tried the BringToFront() function but to no avail.&amp;nbsp; Any help will be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 14:07:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463949#M12569</guid>
      <dc:creator>DanielSheehan1</dc:creator>
      <dc:date>2011-03-31T14:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463950#M12570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you display your form/dialog you need to tell Windows that the ArcMap window is the parent, i.e. IApplication.hWnd.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 16:21:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463950#M12570</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-03-31T16:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463951#M12571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Or another option is to set the FORM properties to TopMost = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously the reults two methods are a tad different.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 17:52:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463951#M12571</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2011-03-31T17:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463952#M12572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;When you display your form/dialog you need to tell Windows that the ArcMap window is the parent, i.e. IApplication.hWnd.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you do this in the show function?&amp;nbsp; The argument can't be hWnd, instead it is looking for a form.&amp;nbsp; Can you give me an example of how you do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 16:22:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463952#M12572</guid>
      <dc:creator>DanielSheehan1</dc:creator>
      <dc:date>2011-04-04T16:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463953#M12573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Or another option is to set the FORM properties to TopMost = True&lt;BR /&gt;Obviously the reults two methods are a tad different.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These are different. I want the results form to appear above when it first appears and ever after but I want the users to be able to bring the Arcmap window to the front once they interact with the form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 16:25:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463953#M12573</guid>
      <dc:creator>DanielSheehan1</dc:creator>
      <dc:date>2011-04-04T16:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463954#M12574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;System.Windows.Forms.Form has members ShowDialog and Show which take IWin32Window as an argument.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Google on "hWnd IWin32Window".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 17:50:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463954#M12574</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-04-04T17:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463955#M12575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, I publish tools all the time that allow arcmap interaction while forms are up.&amp;nbsp; (Downfall is user can alter TOC and other stuff while in the middle of your processes if your program involves counts etc, it can get messy, but thats besides the point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FormWindowState.Normal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and do a [Your]form.show()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 18:38:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463955#M12575</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2011-04-04T18:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463956#M12576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;System.Windows.Forms.Form has members ShowDialog and Show which take IWin32Window as an argument.&lt;BR /&gt;&lt;BR /&gt;Google on "hWnd IWin32Window".&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was hoping for an example.&amp;nbsp; I've tried web searches using those terms and can't see anything that actually works for me.&amp;nbsp; I use something from this forum found using your suggested search terms yesterday that using IntPtr (which most of the results use) and it functions as a topmost = true statement, which remains undesirable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, do you have an example.&amp;nbsp; By that I mean, do you have the lines of code that you have used that works?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 16:57:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463956#M12576</guid>
      <dc:creator>DanielSheehan1</dc:creator>
      <dc:date>2011-04-06T16:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463957#M12577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's an example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First is the Window Wrapper class&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Public Class Win32HWNDWrapper

&amp;nbsp;&amp;nbsp;&amp;nbsp; Implements System.Windows.Forms.IWin32Window
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _hwnd As System.IntPtr

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Handle As System.IntPtr Implements System.Windows.Forms.IWin32Window.Handle
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return _hwnd
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub New(ByVal Handle As System.IntPtr)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _hwnd = Handle
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

End Class
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and the code to open a form&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
MyForm.Show(New Win32HWNDWrapper(m_application.hWnd))
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:36:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463957#M12577</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T20:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463958#M12578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ken,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&amp;nbsp; This is similar to a solution I tried yesterday but yields the same results: it has the effect of form.topmost = true.&amp;nbsp; I want the form to appear above the Arcmap window but then bring the Arcmap window to the front, when the user desires.&amp;nbsp; The app searches metadata for our SDE collection then adds selected layers to the map or brings up the metadata in a browser.&amp;nbsp; Our experience in the VB version is that people like to add data, look at the map, then add more data.&amp;nbsp; It works best as a non modal form that can be put behind the Arcmap window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW your name sounds familiar.&amp;nbsp; Are you with NMFS?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 17:24:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463958#M12578</guid>
      <dc:creator>DanielSheehan1</dc:creator>
      <dc:date>2011-04-06T17:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Forms appearing below Arcmap window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463959#M12579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess I'm not understanding your issue. If I just open the form using MyForm.Show(), then it appears in front of the ArcMap window. If I click on ArcMap, then the ArcMap window will move in front of the form. I can click on the form in the Taskbar to bring it back in front of ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I work in NOS in the Biogeography Branch. I think we might have crossed paths in working with data in the Gulf of Maine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 18:37:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/forms-appearing-below-arcmap-window/m-p/463959#M12579</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2011-04-06T18:37:08Z</dc:date>
    </item>
  </channel>
</rss>

