21 references to GetSafeHandle
System.Windows.Forms (21)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
123
_targetWindowHandle = Control.
GetSafeHandle
(targetWindow);
1086
_targetWindowHandle = Control.
GetSafeHandle
(window);
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
184
ownerHwnd = Control.
GetSafeHandle
(owner);
System\Windows\Forms\Dialogs\MessageBox.cs (1)
460
handle = owner is null ? Control.GetHandleRef(PInvoke.GetActiveWindow()) : Control.
GetSafeHandle
(owner);
System\Windows\Forms\Form.cs (4)
782
cp.Parent =
GetSafeHandle
(dialogOwner).Handle;
3662
?
GetSafeHandle
(dialogOwner)
5407
HandleRef<HWND> ownerHwnd = owner is null ? GetHandleRef(activeHwnd) :
GetSafeHandle
(owner);
5619
HandleRef<HWND> ownerHwnd = owner is null ? GetHandleRef(activeHwnd) :
GetSafeHandle
(owner);
System\Windows\Forms\Internal\Win32WindowExtensions.cs (1)
11
Control.
GetSafeHandle
(window),
System\Windows\Forms\MDI\MDIControlStrip.cs (4)
26
HMENU hMenu = PInvoke.GetSystemMenu(
GetSafeHandle
(target), bRevert: false);
80
HICON hIcon = (HICON)PInvokeCore.SendMessage(
GetSafeHandle
(_target), PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL);
116
HMENU hmenu = PInvoke.GetSystemMenu(
GetSafeHandle
(_target), bRevert: false);
138
_system.DropDown = ToolStripDropDownMenu.FromHMenu(PInvoke.GetSystemMenu(
GetSafeHandle
(_target), bRevert: false), _target);
System\Windows\Forms\ToolTip\ToolTip.cs (8)
1002
return new(Control.
GetSafeHandle
(window), flags);
1409
PInvokeCore.GetWindowRect(Control.
GetSafeHandle
(window), out var r);
1429
PInvokeCore.GetWindowRect(Control.
GetSafeHandle
(window), out var r);
1447
PInvokeCore.GetWindowRect(Control.
GetSafeHandle
(window), out var r);
1465
PInvokeCore.GetWindowRect(Control.
GetSafeHandle
(window), out var r);
1532
ToolInfoWrapper<HandleRef<HWND>> info = new(Control.
GetSafeHandle
(ownerWindow));
1737
ToolInfoWrapper<HandleRef<HWND>> info = new(Control.
GetSafeHandle
(win));
2002
PInvokeCore.GetWindowRect(Control.
GetSafeHandle
(window), out var r);