I'm creating a Windows Form in Excel Workbook AddIn App.. I want to make This form a MdiChild Form of Excel Application.. I am Using This Code but i am getting this Error..
Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))"} System.Runtime.InteropServices.COMException
Added This Class and Implimented the IWin32Window interface
public class WindowImplementation : System.Windows.Forms.IWin32Window
{
public WindowImplementation(IntPtr handle)
{
_hwnd = handle;
}
public IntPtr Handle
{
get
{
return _hwnd;
}
}
private IntPtr _hwnd;
}
Then used this following code to get form shown specifying the parent Excel
//window handle
UserForm u = new UserForm();
u.Show(new WindowImplementation(new IntPtr(Globals.ThisAddIn.Application.Windows[1].Hwnd)));
User contributions licensed under CC BY-SA 3.0