22 implementations of Handle
System.Private.Windows.Core (7)
Windows\Win32\Foundation\HandleRef.cs (1)
26
public required THandle
Handle
{ get; init; }
Windows\Win32\Foundation\HWND.cs (1)
8
HWND IHandle<HWND>.
Handle
=> this;
Windows\Win32\Foundation\NullHandle.cs (1)
12
public T
Handle
=> default;
Windows\Win32\Graphics\Gdi\HDC.cs (1)
8
HDC IHandle<HDC>.
Handle
=> this;
Windows\Win32\Graphics\Gdi\HdcHandle.cs (1)
24
public HDC
Handle
{ get; private set; }
Windows\Win32\UI\WindowsAndMessaging\HCURSOR.cs (1)
8
HCURSOR IHandle<HCURSOR>.
Handle
=> this;
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (1)
8
HICON IHandle<HICON>.
Handle
=> this;
System.Windows.Forms (13)
System\Windows\Forms\Application.ThreadContext.cs (1)
521
HANDLE IHandle<HANDLE>.
Handle
=> Handle;
System\Windows\Forms\Control.cs (1)
12914
HWND IHandle<HWND>.
Handle
=> HWND;
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
759
HIMAGELIST IHandle<HIMAGELIST>.
Handle
=> HIMAGELIST;
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (1)
62
HIMAGELIST IHandle<HIMAGELIST>.
Handle
=> HIMAGELIST;
System\Windows\Forms\Controls\ToolStrips\CachedItemHdcInfo.cs (1)
18
public HDC
Handle
=> _cachedItemHDC;
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (1)
26
public HICON
Handle
=> (HICON)_icon.Handle;
System\Windows\Forms\Input\Cursor.cs (3)
214
HICON IHandle<HICON>.
Handle
=> (HICON)Handle;
216
HANDLE IHandle<HANDLE>.
Handle
=> (HANDLE)Handle;
217
HCURSOR IHandle<HCURSOR>.
Handle
=> _handle;
System\Windows\Forms\NativeWindow.cs (1)
155
HWND IHandle<HWND>.
Handle
=> HWND;
System\Windows\Forms\ToolTip\ToolTip.cs (1)
257
HWND IHandle<HWND>.
Handle
=> HWND;
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (2)
179
HTHEME IHandle<HTHEME>.
Handle
=> (HTHEME)Handle;
879
public HTHEME
Handle
{ get; private set; }
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Message.cs (1)
82
readonly HWND IHandle<HWND>.
Handle
=> HWND;
System.Windows.Forms.Primitives.TestUtilities (1)
Win32\Window.cs (1)
12
public HWND
Handle
{ get; }
130 references to Handle
System.Private.Windows.Core (33)
Windows\Win32\Foundation\HandleRef.cs (1)
39
Handle = handle?.
Handle
?? default;
Windows\Win32\Foundation\IHandle.cs (1)
38
/// Owner of the <see cref="
Handle
"/> that might close it when finalized. Default is the
Windows\Win32\PInvokeCore.BitBlt.cs (2)
21
hdc.
Handle
,
52
hdcSrc.
Handle
,
Windows\Win32\PInvokeCore.CallWindowProc.cs (1)
13
hWnd.
Handle
,
Windows\Win32\PInvokeCore.CopyImage.cs (2)
12
HICON result = (HICON)CopyImage(hImage.
Handle
, GDI_IMAGE_TYPE.IMAGE_ICON, cx, cy, flags);
21
HCURSOR result = (HCURSOR)CopyImage(hImage.
Handle
, GDI_IMAGE_TYPE.IMAGE_CURSOR, cx, cy, flags);
Windows\Win32\PInvokeCore.DragAcceptFiles.cs (1)
11
DragAcceptFiles(hWnd.
Handle
, fAccept);
Windows\Win32\PInvokeCore.DrawIconEx.cs (1)
25
BOOL result = DrawIconEx(hDC, xLeft, yTop, hIcon.
Handle
, cxWidth, cyWidth, 0, HBRUSH.Null, diFlags);
Windows\Win32\PInvokeCore.EnumChildWindows.cs (1)
22
return EnumChildWindows(hwndParent.
Handle
, &EnumChildWindowsNativeCallback, (LPARAM)(nint)gcHandle);
Windows\Win32\PInvokeCore.GetClientRect.cs (1)
12
BOOL result = GetClientRect(hWnd.
Handle
, out lpRect);
Windows\Win32\PInvokeCore.GetIconInfo.cs (1)
12
GetIconInfo(icon.
Handle
, out ICONINFO info);
Windows\Win32\PInvokeCore.GetWindowLong.cs (2)
31
? GetWindowLongPtrW(hWnd.
Handle
, nIndex)
32
: GetWindowLongW(hWnd.
Handle
, nIndex);
Windows\Win32\PInvokeCore.GetWindowRect.cs (1)
11
BOOL result = GetWindowRect(hWnd.
Handle
, out lpRect);
Windows\Win32\PInvokeCore.GetWindowText.cs (2)
24
int newTextLength = GetWindowTextLength(hWnd.
Handle
);
46
int actualTextLength = GetWindowText(hWnd.
Handle
, b, buffer.Length);
Windows\Win32\PInvokeCore.GetWindowTextLength.cs (1)
11
int result = GetWindowTextLength(hWnd.
Handle
);
Windows\Win32\PInvokeCore.GetWindowThreadProcessId.cs (1)
13
uint result = GetWindowThreadProcessId(hWnd.
Handle
, &processId);
Windows\Win32\PInvokeCore.MapWindowPoints.cs (4)
17
int result = MapWindowPoints(hWndFrom.
Handle
, hWndTo.
Handle
, (Point*)p, cPoints: 2);
31
int result = MapWindowPoints(hWndFrom.
Handle
, hWndTo.
Handle
, (Point*)p, cPoints: 1);
Windows\Win32\PInvokeCore.PeekMessage.cs (1)
17
BOOL result = PeekMessage(lpMsg, hWnd.
Handle
, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
Windows\Win32\PInvokeCore.PostMessage.cs (1)
16
BOOL result = PostMessage(hWnd.
Handle
, (uint)Msg, wParam, lParam);
Windows\Win32\PInvokeCore.RegisterDragDrop.cs (1)
21
hr = RegisterDragDrop(hwnd.
Handle
, dropTarget);
Windows\Win32\PInvokeCore.RevokeDragDrop.cs (1)
11
HRESULT result = RevokeDragDrop(hwnd.
Handle
);
Windows\Win32\PInvokeCore.SendMessage.cs (3)
15
LRESULT result = SendMessage(hWnd.
Handle
, (uint)Msg, wParam, lParam);
27
LRESULT result = SendMessage(hWnd.
Handle
, (uint)Msg, (WPARAM)wParam.
Handle
, lParam);
Windows\Win32\PInvokeCore.SetWindowLong.cs (3)
20
? SetWindowLongPtrW(hWnd.
Handle
, nIndex, newValue)
21
: SetWindowLongW(hWnd.
Handle
, nIndex, (int)newValue);
30
nint result = SetWindowLong(hWnd, nIndex, (nint)newValue.
Handle
);
System.Private.Windows.GdiPlus (4)
System\Drawing\IIconExtensions.cs (2)
22
(HANDLE)icon.
Handle
,
27
: icon.
Handle
;
Windows\Win32\Graphics\Gdi\HdcExtensions.cs (2)
22
if (PInvokeCore.GetDeviceCaps(hdc.
Handle
, GET_DEVICE_CAPS_INDEX.BITSPIXEL) > 8)
45
hdc.
Handle
,
System.Windows.Forms (11)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (4)
228
PInvokeCore.MapWindowPoints(_owningChildEdit.
Handle
, HWND.Null, ref pt);
272
if (PInvokeCore.MapWindowPoints(HWND.Null, _owningChildEdit.
Handle
, ref clientLocation) == 0)
308
PInvokeCore.MapWindowPoints(_owningChildEdit.
Handle
, HWND.Null, ref r);
376
using GetDcScope hdc = new(_owningChildEdit.
Handle
);
System\Windows\Forms\Application.cs (1)
1133
ThreadContext? threadContext = ThreadContext.FromId(PInvokeCore.GetWindowThreadProcessId(handle.
Handle
, null));
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
451
using GetDcScope hdc = new(_owningChildEdit.
Handle
);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (2)
497
=> hwndParent.
Handle
== hwndChild.
Handle
|| PInvoke.IsChild(hwndParent, hwndChild);
System\Windows\Forms\Form.cs (1)
3427
if (icon is not null && !TaskbarOwner.
Handle
.IsNull)
System\Windows\Forms\NativeWindow.cs (1)
281
s_windowIds[id] = handle.
Handle
;
System\Windows\Forms\StringSource.cs (1)
48
edit.
Handle
,
System.Windows.Forms.Primitives (82)
Windows\Win32\PInvoke.ChildWindowFromPointEx.cs (1)
14
HWND result = ChildWindowFromPointEx(hwndParent.
Handle
, pt, uFlags);
Windows\Win32\PInvoke.ClientToScreen.cs (1)
14
BOOL result = ClientToScreen(hWnd.
Handle
, ref lpPoint);
Windows\Win32\PInvoke.CloseHandle.cs (1)
11
BOOL result = CloseHandle(handle.
Handle
);
Windows\Win32\PInvoke.DestroyAcceleratorTable.cs (1)
12
BOOL result = DestroyAcceleratorTable(hAccel.
Handle
);
Windows\Win32\PInvoke.DrawMenuBar.cs (1)
12
BOOL result = DrawMenuBar(hWnd.
Handle
);
Windows\Win32\PInvoke.EnableMenuItem.cs (1)
12
BOOL result = EnableMenuItem(hMenu.
Handle
, uIDEnableItem, uEnable);
Windows\Win32\PInvoke.EnableScrollBar.cs (1)
12
BOOL result = EnableScrollBar(hWnd.
Handle
, (uint)wSBflags, wArrows);
Windows\Win32\PInvoke.EnableWindow.cs (1)
12
BOOL result = EnableWindow(hWnd.
Handle
, bEnable);
Windows\Win32\PInvoke.EndDialog.cs (1)
12
BOOL result = EndDialog(hDlg.
Handle
, nResult);
Windows\Win32\PInvoke.FillRect.cs (1)
12
int result = FillRect(hDC.
Handle
, in lprc, hbr);
Windows\Win32\PInvoke.GetAncestor.cs (1)
11
HWND result = GetAncestor(hwnd.
Handle
, flags);
Windows\Win32\PInvoke.GetDlgItem.cs (1)
12
HWND result = GetDlgItem(hDlg.
Handle
, nIDDlgItem);
Windows\Win32\PInvoke.GetDpiForWindow.cs (1)
13
uint result = GetDpiForWindow(hwnd.
Handle
);
Windows\Win32\PInvoke.GetMenu.cs (1)
12
HMENU result = GetMenu(hWnd.
Handle
);
Windows\Win32\PInvoke.GetMenuItemCount.cs (1)
12
int result = GetMenuItemCount(hMenu.
Handle
);
Windows\Win32\PInvoke.GetParent.cs (1)
11
HWND result = GetParent(hwnd.
Handle
);
Windows\Win32\PInvoke.GetScrollInfo.cs (1)
12
BOOL result = GetScrollInfo(hwnd.
Handle
, nBar, ref lpsi);
Windows\Win32\PInvoke.GetSystemMenu.cs (1)
11
HMENU result = GetSystemMenu(hwnd.
Handle
, bRevert);
Windows\Win32\PInvoke.GetTextExtentPoint32.cs (1)
15
BOOL result = GetTextExtentPoint32W(hdc.
Handle
, pString, c, (SIZE*)(void*)&size);
Windows\Win32\PInvoke.GetThemeFont.cs (1)
16
HRESULT result = GetThemeFont(hTheme.
Handle
, hdc, iPartId, iStateId, iPropId, (LOGFONTW*)p);
Windows\Win32\PInvoke.GetWindow.cs (1)
11
HWND result = GetWindow(hWnd.
Handle
, uCmd);
Windows\Win32\PInvoke.HtmlHelp.cs (3)
14
HWND result = HtmlHelp(hwndCaller.
Handle
, pszFile, uCommand, dwData);
25
HWND result = HtmlHelp(hwndCaller.
Handle
, pszFile, uCommand, (nuint)d);
42
HWND result = HtmlHelp(hwndCaller.
Handle
, pszFile, uCommand, (nuint)v);
Windows\Win32\PInvoke.ImageList.cs (15)
15
int result = ImageList_Add(himl.
Handle
, hbmImage, hbmMask);
23
bool result = ImageList_Destroy(himl.
Handle
);
32
BOOL result = ImageList_Draw(himl.
Handle
, i, hdcDst, x, y, fStyle);
50
bool result = ImageList_DrawEx(himl.
Handle
, i, hdcDst.
Handle
, x, y, dx, dy, rgbBk, rgbFg, fStyle);
62
bool result = ImageList_GetIconSize(himl.
Handle
, px, py);
71
int result = ImageList_GetImageCount(himl.
Handle
);
79
bool result = ImageList_GetImageInfo(himl.
Handle
, i, out pImageInfo);
87
bool result = ImageList_Remove(himl.
Handle
, i);
95
bool result = ImageList_Replace(himl.
Handle
, i, hbmImage, hbmMask);
106
int result = ImageList_ReplaceIcon(himl.
Handle
, i, hicon.
Handle
);
115
COLORREF result = ImageList_SetBkColor(himl.
Handle
, clrBk);
124
BOOL result = ImageList_Write(himl.
Handle
, stream);
136
HRESULT result = ImageList_WriteEx(himl.
Handle
, dwFlags, stream);
Windows\Win32\PInvoke.ImmGetContext.cs (1)
13
HIMC result = ImmGetContext(hWnd.
Handle
);
Windows\Win32\PInvoke.ImmReleaseContext.cs (1)
13
BOOL result = ImmReleaseContext(hWnd.
Handle
, hIMC);
Windows\Win32\PInvoke.IntersectClipRect.cs (1)
11
GDI_REGION_TYPE result = IntersectClipRect(hdc.
Handle
, left, top, right, bottom);
Windows\Win32\PInvoke.InvalidateRect.cs (1)
12
BOOL result = InvalidateRect(hWnd.
Handle
, lpRect, bErase);
Windows\Win32\PInvoke.InvalidateRgn.cs (1)
12
BOOL result = InvalidateRgn(hWnd.
Handle
, hrgn, erase);
Windows\Win32\PInvoke.IsAccelerator.cs (1)
12
bool result = IsAccelerator(hAccel.
Handle
, cAccelEntries, lpMsg, lpwCmd);
Windows\Win32\PInvoke.IsChild.cs (2)
13
BOOL result = IsChild(hWndParent.
Handle
, hWnd.
Handle
);
Windows\Win32\PInvoke.IsWindow.cs (1)
11
BOOL result = IsWindow(hWnd.
Handle
);
Windows\Win32\PInvoke.IsWindowEnabled.cs (1)
11
BOOL result = IsWindowEnabled(hWnd.
Handle
);
Windows\Win32\PInvoke.IsWindowVisible.cs (1)
11
BOOL result = IsWindowVisible(hWnd.
Handle
);
Windows\Win32\PInvoke.KillTimer.cs (1)
12
BOOL result = KillTimer(hWnd.
Handle
, uIDEvent);
Windows\Win32\PInvoke.NotifyWinEvent.cs (1)
12
NotifyWinEvent(@event, hwnd.
Handle
, idObject, idChild);
Windows\Win32\PInvoke.RedrawWindow.cs (1)
12
BOOL result = RedrawWindow(hWnd.
Handle
, lprcUpdate, hrgnUpdate, flags);
Windows\Win32\PInvoke.ScreenToClient.cs (1)
14
BOOL result = ScreenToClient(hWnd.
Handle
, ref lpPoint);
Windows\Win32\PInvoke.ScrollWindow.cs (1)
12
BOOL result = ScrollWindow(hWnd.
Handle
, XAmount, YAmount, lpRect, rectClip);
Windows\Win32\PInvoke.ScrollWindowEx.cs (1)
19
int result = ScrollWindowEx(hWnd.
Handle
, dx, dy, prcScroll, prcClip, hrgnUpdate, prcUpdate, flags);
Windows\Win32\PInvoke.SendMessageCallback.cs (1)
20
BOOL result = SendMessageCallback(hWnd.
Handle
, Msg, wParam, lParam, &NativeCallback, (nuint)(nint)gcHandle);
Windows\Win32\PInvoke.SetActiveWindow.cs (1)
11
HWND result = SetActiveWindow(hWnd.
Handle
);
Windows\Win32\PInvoke.SetCapture.cs (1)
11
IntPtr result = SetCapture(hWnd.
Handle
);
Windows\Win32\PInvoke.SetFocus.cs (1)
11
HWND result = SetFocus(hWnd.
Handle
);
Windows\Win32\PInvoke.SetForegroundWindow.cs (1)
11
BOOL result = SetForegroundWindow(hWnd.
Handle
);
Windows\Win32\PInvoke.SetLayeredWindowAttributes.cs (1)
12
BOOL result = SetLayeredWindowAttributes(hwnd.
Handle
, crKey, bAlpha, dwFlags);
Windows\Win32\PInvoke.SetMenu.cs (3)
12
BOOL result = SetMenu(hWnd.
Handle
, hMenu);
22
BOOL result = SetMenu(hWnd.
Handle
, hMenu.
Handle
);
Windows\Win32\PInvoke.SetParent.cs (2)
13
HWND result = SetParent(hWndChild.
Handle
, hWndNewParent.
Handle
);
Windows\Win32\PInvoke.SetScrollInfo.cs (1)
12
int result = SetScrollInfo(hWnd.
Handle
, nBar, lpsi, redraw);
Windows\Win32\PInvoke.SetScrollPos.cs (1)
12
int result = SetScrollPos(hWnd.
Handle
, nBar, nPos, bRedraw);
Windows\Win32\PInvoke.SetTimer.cs (1)
11
UIntPtr result = SetTimer(hWnd.
Handle
, nIDEvent, uElapse, lpTimerFunc: null);
Windows\Win32\PInvoke.SetWindowPos.cs (2)
13
BOOL result = SetWindowPos(hWnd.
Handle
, hWndInsertAfter.
Handle
, X, Y, cx, cy, uFlags);
Windows\Win32\PInvoke.SetWindowRgn.cs (1)
12
int result = SetWindowRgn(hwnd.
Handle
, hrgn, fRedraw);
Windows\Win32\PInvoke.SetWindowText.cs (1)
11
BOOL result = SetWindowText(hWnd.
Handle
, text);
Windows\Win32\PInvoke.SHAutoComplete.cs (1)
11
HRESULT result = SHAutoComplete(hwndEdit.
Handle
, flags);
Windows\Win32\PInvoke.ShowWindow.cs (1)
11
BOOL result = ShowWindow(hWnd.
Handle
, nCmdShow);
Windows\Win32\PInvoke.UiaHostProviderFromHwnd.cs (1)
14
HRESULT result = UiaHostProviderFromHwnd(hwnd.
Handle
, &provider);
Windows\Win32\PInvoke.UiaReturnRawElementProvider.cs (1)
19
LRESULT result = UiaReturnRawElementProvider(hwnd.
Handle
, wParam, lParam, provider);
Windows\Win32\PInvoke.UpdateWindow.cs (1)
11
BOOL result = UpdateWindow(hWnd.
Handle
);
Windows\Win32\PInvoke.ValidateRect.cs (1)
12
BOOL result = ValidateRect(hWnd.
Handle
, lpRect);
Windows\Win32\UI\Controls\ToolInfoWrapper.cs (2)
17
: this(handle, handle.
Handle
, flags | TOOLTIP_FLAGS.TTF_IDISHWND, text)
26
hwnd = handle.
Handle
,