AnsweredAssumed Answered

Arcgis pro sdk Windows Form handler problem

Question asked by tkoka3 on Oct 1, 2018
Latest reply on Oct 3, 2018 by joonpark2

Hi ,

We using  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 ((IntPtr)ArcMap.Application.hWnd) . Application therefor forms are sliding down. How can I solve this problem ? 

 

Here is below when we use properly windows forms  when we develope tools for ArcMap.

 

public class Library
{
private const int GWL_HWNDPARENT = -8;
[DllImport("User32", CharSet = CharSet.Auto)]
private static extern int SetWindowLong(IntPtr hWnd, int Index, int Value);


public static void SetParentForm(IntPtr parentHandle, IntPtr childHandle)
{
SetWindowLong(childHandle, GWL_HWNDPARENT, parentHandle.ToInt32());
}

 

}

 

 

Library.SetParentForm((IntPtr)ArcMap.Application.hWnd, this.anaYolForm.Handle);

 

 

Thanks For Helping.

Outcomes