<?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 Arcgis pro sdk Windows Form handler problem in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-windows-form-handler-problem/m-p/865430#M4914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;We using&amp;nbsp; Arcgis Pro SDK for .Net version 2.2.0 We are developing tools for Arcgis Pro. We are using windows forms in it but we can not find parent handler in Arcgis Pro SDK but in ArcObject I can like (&lt;SPAN&gt;(IntPtr)ArcMap.Application.hWnd&lt;/SPAN&gt;) . Application therefor forms are sliding down. How can I solve this problem ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is below when we use properly windows forms&amp;nbsp; when we develope tools for ArcMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public class Library&lt;BR /&gt; {&lt;BR /&gt; private const int GWL_HWNDPARENT = -8;&lt;BR /&gt; [DllImport("User32", CharSet = CharSet.Auto)]&lt;BR /&gt; private static extern int SetWindowLong(IntPtr hWnd, int Index, int Value);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; public static void SetParentForm(IntPtr parentHandle, IntPtr childHandle)&lt;BR /&gt; {&lt;BR /&gt; SetWindowLong(childHandle, GWL_HWNDPARENT, parentHandle.ToInt32());&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Library.&lt;/SPAN&gt;SetParentForm((IntPtr)ArcMap.Application.hWnd, this.anaYolForm.Handle);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks For Helping.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Oct 2018 12:33:55 GMT</pubDate>
    <dc:creator>tanerkoka</dc:creator>
    <dc:date>2018-10-01T12:33:55Z</dc:date>
    <item>
      <title>Arcgis pro sdk Windows Form handler problem</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-windows-form-handler-problem/m-p/865430#M4914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;We using&amp;nbsp; Arcgis Pro SDK for .Net version 2.2.0 We are developing tools for Arcgis Pro. We are using windows forms in it but we can not find parent handler in Arcgis Pro SDK but in ArcObject I can like (&lt;SPAN&gt;(IntPtr)ArcMap.Application.hWnd&lt;/SPAN&gt;) . Application therefor forms are sliding down. How can I solve this problem ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is below when we use properly windows forms&amp;nbsp; when we develope tools for ArcMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public class Library&lt;BR /&gt; {&lt;BR /&gt; private const int GWL_HWNDPARENT = -8;&lt;BR /&gt; [DllImport("User32", CharSet = CharSet.Auto)]&lt;BR /&gt; private static extern int SetWindowLong(IntPtr hWnd, int Index, int Value);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; public static void SetParentForm(IntPtr parentHandle, IntPtr childHandle)&lt;BR /&gt; {&lt;BR /&gt; SetWindowLong(childHandle, GWL_HWNDPARENT, parentHandle.ToInt32());&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Library.&lt;/SPAN&gt;SetParentForm((IntPtr)ArcMap.Application.hWnd, this.anaYolForm.Handle);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks For Helping.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 12:33:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-windows-form-handler-problem/m-p/865430#M4914</guid>
      <dc:creator>tanerkoka</dc:creator>
      <dc:date>2018-10-01T12:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis pro sdk Windows Form handler problem</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-windows-form-handler-problem/m-p/865431#M4915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the System.Windows.Interop.WindowInteropHelper class:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.interop.windowinterophelper?view=netframework-4.7.2"&gt;https://docs.microsoft.com/en-us/dotnet/api/system.windows.interop.windowinterophelper?view=netframework-4.7.2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass in the WPF Window whose handle you want. Probably FrameworkApplication.Current.MainWIndow in your case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 17:10:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-windows-form-handler-problem/m-p/865431#M4915</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2018-10-01T17:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis pro sdk Windows Form handler problem</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-windows-form-handler-problem/m-p/865432#M4916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way is to use win32 FindWindow (&lt;A class="link-titled" href="https://stackoverflow.com/questions/49189701/findwindow-not-working" title="https://stackoverflow.com/questions/49189701/findwindow-not-working"&gt;windows - FindWindow() not working - Stack Overflow&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;Dim ret As Long&lt;BR /&gt;ret = FindWindow(Nothing, "ArcGIS PRO Project Name")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2018 22:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-windows-form-handler-problem/m-p/865432#M4916</guid>
      <dc:creator>joonpark</dc:creator>
      <dc:date>2018-10-03T22:04:41Z</dc:date>
    </item>
  </channel>
</rss>

