/// <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());
}
/// 得到主窗体句柄
/// </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());
}