标签:
Form1 f1 = new Form1();
IntPtr intPtr ;
int hwnd = Globals.ThisAddIn.Application.Hwnd;//获取句柄
//intPtr = new IntPtr(hwnd); //方法一
intPtr = Process.GetCurrentProcess().MainWindowHandle; //方法二
NativeWindow win = NativeWindow.FromHandle(intPtr );
f1.Show(win);
标签:
原文地址:http://www.cnblogs.com/valor-xh/p/5827961.html