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)
184ownerHwnd = Control.GetSafeHandle(owner);
System\Windows\Forms\Dialogs\MessageBox.cs (1)
460handle = owner is null ? Control.GetHandleRef(PInvoke.GetActiveWindow()) : Control.GetSafeHandle(owner);
System\Windows\Forms\Form.cs (4)
782cp.Parent = GetSafeHandle(dialogOwner).Handle; 3662? GetSafeHandle(dialogOwner) 5407HandleRef<HWND> ownerHwnd = owner is null ? GetHandleRef(activeHwnd) : GetSafeHandle(owner); 5619HandleRef<HWND> ownerHwnd = owner is null ? GetHandleRef(activeHwnd) : GetSafeHandle(owner);
System\Windows\Forms\Internal\Win32WindowExtensions.cs (1)
11Control.GetSafeHandle(window),
System\Windows\Forms\MDI\MDIControlStrip.cs (4)
26HMENU hMenu = PInvoke.GetSystemMenu(GetSafeHandle(target), bRevert: false); 80HICON hIcon = (HICON)PInvokeCore.SendMessage(GetSafeHandle(_target), PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL); 116HMENU 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)
1002return new(Control.GetSafeHandle(window), flags); 1409PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 1429PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 1447PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 1465PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r); 1532ToolInfoWrapper<HandleRef<HWND>> info = new(Control.GetSafeHandle(ownerWindow)); 1737ToolInfoWrapper<HandleRef<HWND>> info = new(Control.GetSafeHandle(win)); 2007PInvokeCore.GetWindowRect(Control.GetSafeHandle(window), out var r);