start
/// <summary>
/// 得到主窗体句柄
/// </summary>
/// <returns></returns>
public static IntPtr GetIntPtr()
{
return Process.GetCurrentProcess().MainWindowHandle;
}
/// <summary>
/// 得到Revit主窗体
/// </summary>
/// <returns></returns>
public static System.Windows.Forms.Form GetRevitForm()
{
return (System.Windows.Forms.Form)System.Windows.Forms.Control.FromHandle(GetIntPtr());
}
url:http://greatverve.cnblogs.com/p/get-revit-child-form.html