得到Revit子窗体

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
posted @ 2014-03-03 19:22  大气象  阅读(1902)  评论(1编辑  收藏  举报
http://www.tianqiweiqi.com