public static TreeNode FromHandle(TreeView tree, IntPtr handle) { if (handle == IntPtr.Zero) { return(null); } // No arg checking on MS it just throws a NullRef if treeview is null return(tree.NodeFromHandle(handle)); }
/// <include file='doc\TreeNode.uex' path='docs/doc[@for="TreeNode.FromHandle"]/*' /> /// <devdoc> /// Returns a TreeNode object for the given HTREEITEM handle /// </devdoc> public static TreeNode FromHandle(TreeView tree, IntPtr handle) { // SECREVIEW: // Demand before we pass the TreeNode form handle. IntSecurity.ControlFromHandleOrLocation.Demand(); return tree.NodeFromHandle(handle); }
public static TreeNode FromHandle (TreeView tree, IntPtr handle) { if (handle == IntPtr.Zero) return null; // No arg checking on MS it just throws a NullRef if treeview is null return tree.NodeFromHandle (handle); }