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