21 references to GetSafeHandle
System.Windows.Forms (21)
winforms\Managed\System\WinForms\CommonDialog.cs (1)
279hwndOwner = Control.GetSafeHandle(owner);
winforms\Managed\System\WinForms\Form.cs (6)
1014cp.Parent = Control.GetSafeHandle(dialogOwner); 4030IntPtr ownerHandle = (dialogOwner != null) ? Control.GetSafeHandle(dialogOwner) : OwnerInternal.Handle; 6091else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE) 6098IntPtr hWndOwner = owner == null ? hWndActive : Control.GetSafeHandle(owner); 6156else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE) 6175IntPtr hWndOwner = owner == null ? hWndActive : Control.GetSafeHandle(owner);
winforms\Managed\System\WinForms\MDIControlStrip.cs (4)
36IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false); 131IntPtr hIcon = UnsafeNativeMethods.SendMessage(new HandleRef(this, Control.GetSafeHandle(target)), NativeMethods.WM_GETICON, NativeMethods.ICON_SMALL, 0); 167IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false); 185system.DropDown = ToolStripDropDownMenu.FromHMenu(UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false), target);
winforms\Managed\System\WinForms\MessageBox.cs (1)
461handle = Control.GetSafeHandle(owner);
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (2)
114this.targetWindowHandle = Control.GetSafeHandle(targetWindow); 1203targetWindowHandle = Control.GetSafeHandle(window);
winforms\Managed\System\WinForms\ToolTip.cs (7)
1660UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1687UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1712UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1737UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1959IntPtr hWnd = Control.GetSafeHandle(win); 2064IntPtr hWnd = Control.GetSafeHandle(win); 2247UnsafeNativeMethods.GetWindowRect(new HandleRef(win, Control.GetSafeHandle(win)), ref r);