I've been trying to display a modeless form with the parent ArcMap form as the parent.
This code works, but only the first time.
IntPtr pPtr = new IntPtr(_application.hWnd);
_parentWindow = (System.Windows.Forms.Form)System.Windows.Forms.Form.FromHandle(pPtr);
this.Show(_parentWindow);
Where _application is a valid reference to the current IApplication ArcMap object
If I close the dialog box and try to open it a second time, _parentWindow is always null. Even though _application.hWnd > 0.
Is there any reason why this only works once?
How can I create a modeless dialog in ArcMap (C#) that the user can open and close and will always have ArcMap as the parent?
Thanks,
rick.