得到Revit子窗体
时间:2014-03-04 11:51:24
收藏:0
阅读:615
start
url:http://greatverve.cnblogs.com/p/get-revit-child-form.html
/// <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());
}
原文:http://www.cnblogs.com/greatverve/p/get-revit-child-form.html
评论(0)
