217 references to Handle
PresentationCore (2)
Core\CSharp\System\Windows\Interop\HwndTarget.cs (2)
525Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 561Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero);
PresentationFramework (34)
src\Framework\MS\Internal\Controls\ActiveXContainer.cs (1)
122return _host.ParentHandle.Handle;
src\Framework\MS\Internal\Controls\ActiveXSite.cs (3)
197if (this.Host.ControlHandle.Handle != hwnd) 239return this.Host.ParentHandle.Handle; 301lpFrameInfo.hwndFrame = this.Host.ParentHandle.Handle;
src\Framework\System\Windows\Interop\ActiveXHost.cs (4)
178if (ControlHandle.Handle == IntPtr.Zero) 564this.ParentHandle.Handle, 577if (_axWindow.Handle == hwnd) 586if (this.ParentHandle.Handle != IntPtr.Zero)
src\Framework\System\Windows\Interop\HwndHost.cs (25)
411if (_hwnd.Handle != IntPtr.Zero && (hwndFocus.Handle == _hwnd.Handle || UnsafeNativeMethods.IsChild(_hwnd, hwndFocus))) 546DpiScale2 dpi = DpiUtil.GetWindowDpi(_hwnd.Handle, fallbackToNearestMonitorHeuristic: false); 895if(_hwnd.Handle != IntPtr.Zero && UnsafeNativeMethods.IsWindow(_hwnd)) 903if(hdcScreen.Handle != IntPtr.Zero) 911if(hdcBitmap.Handle != IntPtr.Zero) 915if(hBitmap.Handle != IntPtr.Zero) 918IntPtr hOldBitmap = UnsafeNativeMethods.CriticalSelectObject(hdcBitmap, hBitmap.Handle); 924UnsafeNativeMethods.CriticalFillRect(hdcBitmap.Handle, ref rcPaint, hbrWhite); 936UnsafeNativeMethods.SendMessage(_hwnd.Handle, WindowMessage.WM_PRINT, hdcBitmap.Handle, (IntPtr) (NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT)); 952System.Windows.Media.Imaging.BitmapSource bitmapSource = Imaging.CriticalCreateBitmapSourceFromHBitmap(hBitmap.Handle, IntPtr.Zero, Int32Rect.Empty, null, WICBitmapAlphaChannelOption.WICBitmapIgnoreAlpha); 970if(hBitmap.Handle != IntPtr.Zero) 976if(hdcBitmap.Handle != IntPtr.Zero) 1183if(_hwnd.Handle == IntPtr.Zero) 1199else if (!FrameworkAppContextSwitches.Enable2019_12_B || _hwnd.Handle != IntPtr.Zero) // When the "knob" is disabled, it would be as if this condition didn't exist - which is equivalent to the code prior to this change. 1240if(_hwnd.Handle == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(_hwnd)) 1246int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,_hwnd.Handle), NativeMethods.GWL_STYLE); 1253if(hwndParent.Handle != UnsafeNativeMethods.GetParent(_hwnd)) 1259if (DpiUtil.GetDpiAwarenessContext(_hwnd.Handle) != DpiUtil.GetDpiAwarenessContext(hwndParent.Handle)) 1278_hwndSubclass.CriticalAttach(_hwnd.Handle); 1346if(_hwnd.Handle != IntPtr.Zero) 1354return _hwnd.Handle;
src\Framework\System\Windows\SystemResources.cs (1)
1728DpiUtil.GetExtendedDpiInfoForWindow(hwnd.Handle, fallbackToNearestMonitorHeuristic: true) :
System.Activities.Presentation (1)
Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (1)
56IntPtr windowStyle = Win32Interop.GetWindowLongPtr(hwnd.Handle, Win32Interop.GWL_STYLE);
System.Data (10)
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (1)
56IntPtr windowStyle = Win32Interop.GetWindowLongPtr(hwnd.Handle, Win32Interop.GWL_STYLE);
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (5)
2072buffer.PtrOffset(256, IntPtr.Size).Handle); 2141buffer.PtrOffset(256, IntPtr.Size).Handle); 2230IntPtr colnameActual = buffer.PtrOffset(colnameActualOffset, IntPtr.Size).Handle; 2231IntPtr indexActual = buffer.PtrOffset(indexActualOffset, IntPtr.Size).Handle; 2232IntPtr ordinalActual = buffer.PtrOffset(ordinalActualOffset, IntPtr.Size).Handle;
fx\src\data\System\Data\Odbc\OdbcParameter.cs (4)
746&& (_boundBuffer == valueBuffer.Handle) 747&& (_boundIntbuffer == intBuffer.Handle) 780_boundBuffer = valueBuffer.Handle; 781_boundIntbuffer = intBuffer.Handle;
System.Drawing (43)
misc\GDI\UnsafeNativeMethods.cs (43)
58DbgUtil.AssertWin32(retVal, "DeleteDC([hdc=0x{0:X8}]) failed.", hDC.Handle); 64DbgUtil.AssertWin32(retVal, "DeleteHDC([hdc=0x{0:X8}]) failed.", hDC.Handle); 87DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateDC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.Handle); 101DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateIC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.Handle); 117DbgUtil.AssertWin32(compatibleDc != IntPtr.Zero, "CreateCompatibleDC([hdc=0x{0:X8}]) failed", hDC.Handle); 128DbgUtil.AssertWin32(state != 0, "SaveDC([hdc=0x{0:X8}]) failed", hDC.Handle); 159DbgUtil.AssertWin32(retVal, "OffsetViewportOrgEx([hdc=0x{0:X8}], dx=[{1}], dy=[{2}], [out pPoint]) failed.", hDC.Handle, nXOffset, nYOffset); 169DbgUtil.AssertWin32(iMode != 0, "SetGraphicsMode([hdc=0x{0:X8}], [GM_ADVANCED]) failed.", hDC.Handle); 191Debug.Assert(hRgnDest.Wrapper != null && hRgnDest.Handle != IntPtr.Zero, "Destination region is invalid"); 192Debug.Assert(hRgnSrc1.Wrapper != null && hRgnSrc1.Handle != IntPtr.Zero, "Source region 1 is invalid"); 193Debug.Assert(hRgnSrc2.Wrapper != null && hRgnSrc2.Handle != IntPtr.Zero, "Source region 2 is invalid"); 208DbgUtil.AssertWin32(retVal != -1, "IntGetClipRgn([hdc=0x{0:X8}], [hRgn]) failed.", hDC.Handle); 218DbgUtil.AssertWin32(result != IntNativeMethods.RegionFlags.ERROR, "SelectClipRgn([hdc=0x{0:X8}], [hRegion=0x{1:X8}]) failed.", hDC.Handle, hRgn.Handle); 228DbgUtil.AssertWin32(result != IntNativeMethods.RegionFlags.ERROR, "GetRgnBox([hRegion=0x{0:X8}], [out rect]) failed.", hRgn.Handle); 255DbgUtil.AssertWin32(retVal, "DeleteObject(hObj=[0x{0:X8}]) failed.", hObject.Handle); 265DbgUtil.AssertWin32(retVal != 0, "GetObject(hObj=[0x{0:X8}], [LOGBRUSH]) failed.", hBrush.Handle); 276DbgUtil.AssertWin32(retVal != 0, "GetObject(hObj=[0x{0:X8}], [LOGFONT]) failed.", hFont.Handle); 288DbgUtil.AssertWin32(oldObj != IntPtr.Zero, "SelectObject(hdc=hObj=[0x{0:X8}], hObj=[0x{1:X8}]) failed.", hdc.Handle, obj.Handle); 346DbgUtil.AssertWin32(oldMode != 0, "SetBkMode(hdc=[0x{0:X8}], Mode=[{1}]) failed.", hDC.Handle, nBkMode ); 356DbgUtil.AssertWin32(mode != 0, "GetBkMode(hdc=[0x{0:X8}]) failed.", hDC.Handle); 400DbgUtil.AssertWin32( retVal != 0, "DrawText(hdc=[0x{0:X8}], text=[{1}], rect=[{2}], flags=[{3}] failed.", hDC.Handle, text, lpRect, nFormat ); 439DbgUtil.AssertWin32(retVal != 0, "DrawTextEx(hdc=[0x{0:X8}], text=[{1}], rect=[{2}], flags=[{3}] failed.", hDC.Handle, text, lpRect, nFormat ); 474DbgUtil.AssertWin32(retVal != 0, "GetTextExtentPoint32(hdc=[0x{0:X8}], text=[{1}], size=[{2}] failed.", hDC.Handle, text, size ); 492DbgUtil.AssertWin32(retVal, "LineTo(hdc=[0x{0:X8}], x=[{1}], y=[{2}] failed.", hdc.Handle, x, y ); 502DbgUtil.AssertWin32(retVal, "MoveToEx(hdc=[0x{0:X8}], x=[{1}], y=[{2}], pt=[{3}] failed.", hdc.Handle, x, y, pt ); 512DbgUtil.AssertWin32(retVal, "Rectangle(hdc=[0x{0:X8}], left=[{1}], top=[{2}], right=[{3}], bottom=[{4}] failed.", hdc.Handle, left, top, right, bottom ); 522DbgUtil.AssertWin32(retVal, "FillRect(hdc=[0x{0:X8}], rect=[{1}], hbrush=[{2}]", hDC.Handle, rect, hbrush.Handle); 532DbgUtil.AssertWin32(oldMapMode != 0, "SetMapMode(hdc=[0x{0:X8}], MapMode=[{1}]", hDC.Handle, nMapMode); 542DbgUtil.AssertWin32(mapMode != 0, "GetMapMode(hdc=[0x{0:X8}]", hDC.Handle); 552DbgUtil.AssertWin32(retVal, "GetViewportExtEx([hdc=0x{0:X8}], [out size]) failed.", hdc.Handle); 562DbgUtil.AssertWin32(retVal, "GetViewportOrgEx([hdc=0x{0:X8}], [out point]) failed.", hdc.Handle); 572DbgUtil.AssertWin32(retVal, "SetViewportExtEx([hdc=0x{0:X8}], x=[{1}], y=[{2}], [out size]) failed.", hDC.Handle, x, y); 581DbgUtil.AssertWin32(retVal, "SetViewportOrgEx([hdc=0x{0:X8}], x=[{1}], y=[{2}], [out point]) failed.", hDC.Handle, x, y); 632DbgUtil.AssertWin32(retVal != 0, "GetTextMetrics(hdc=[0x{0:X8}], [out TEXTMETRIC] failed.", hDC.Handle ); 642DbgUtil.AssertWin32(retVal, "BeginPath(hdc=[0x{0:X8}]failed.", hDC.Handle ); 652DbgUtil.AssertWin32(retVal, "EndPath(hdc=[0x{0:X8}]failed.", hDC.Handle); 662DbgUtil.AssertWin32(retVal, "StrokePath(hdc=[0x{0:X8}]failed.", hDC.Handle ); 672DbgUtil.AssertWin32(retVal, "AngleArc(hdc=[0x{0:X8}], ...) failed.", hDC.Handle); 702DbgUtil.AssertWin32(retVal, "Arc(hdc=[0x{0:X8}], ...) failed.", hDC.Handle); 718DbgUtil.AssertWin32(retVal, "Ellipse(hdc=[0x{0:X8}], x1=[{1}], y1=[{2}], x2=[{3}], y2=[{4}]) failed.", hDc.Handle, x1, y1, x2, y2);
System.Web (16)
Compilation\CompilationLock.cs (4)
68if (_mutexHandle.Handle == IntPtr.Zero) { 91if (_mutexHandle.Handle != IntPtr.Zero) { 103if (_mutexHandle.Handle == IntPtr.Zero) 137if (_mutexHandle.Handle == IntPtr.Zero)
FileChangesMonitor.cs (1)
487if (ndirMonCompletionHandle.Handle != IntPtr.Zero) {
ImpersonationContext.cs (7)
40if (_savedToken.Handle != IntPtr.Zero) { 42UnsafeNativeMethods.CloseHandle(_savedToken.Handle); 54if (_savedToken.Handle != IntPtr.Zero) { 61if (token.Handle != IntPtr.Zero) { 62if (UnsafeNativeMethods.SetThreadToken(IntPtr.Zero, token.Handle) == 0) { 84if (_savedToken.Handle != IntPtr.Zero) { 86if (UnsafeNativeMethods.SetThreadToken(IntPtr.Zero, _savedToken.Handle) == 0) {
State\OutOfProcStateClientManager.cs (4)
292socketHandle = new HandleRef(this, conn._socketHandle.Handle); 306"socket=" + (IntPtr)socketHandle.Handle + 342else if (results.socket != socketHandle.Handle) { 713if (_socketHandle.Handle != OutOfProcSessionStateStore.INVALID_SOCKET) {
System.Windows.Forms (109)
misc\GDI\UnsafeNativeMethods.cs (43)
58DbgUtil.AssertWin32(retVal, "DeleteDC([hdc=0x{0:X8}]) failed.", hDC.Handle); 64DbgUtil.AssertWin32(retVal, "DeleteHDC([hdc=0x{0:X8}]) failed.", hDC.Handle); 87DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateDC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.Handle); 101DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateIC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.Handle); 117DbgUtil.AssertWin32(compatibleDc != IntPtr.Zero, "CreateCompatibleDC([hdc=0x{0:X8}]) failed", hDC.Handle); 128DbgUtil.AssertWin32(state != 0, "SaveDC([hdc=0x{0:X8}]) failed", hDC.Handle); 159DbgUtil.AssertWin32(retVal, "OffsetViewportOrgEx([hdc=0x{0:X8}], dx=[{1}], dy=[{2}], [out pPoint]) failed.", hDC.Handle, nXOffset, nYOffset); 169DbgUtil.AssertWin32(iMode != 0, "SetGraphicsMode([hdc=0x{0:X8}], [GM_ADVANCED]) failed.", hDC.Handle); 191Debug.Assert(hRgnDest.Wrapper != null && hRgnDest.Handle != IntPtr.Zero, "Destination region is invalid"); 192Debug.Assert(hRgnSrc1.Wrapper != null && hRgnSrc1.Handle != IntPtr.Zero, "Source region 1 is invalid"); 193Debug.Assert(hRgnSrc2.Wrapper != null && hRgnSrc2.Handle != IntPtr.Zero, "Source region 2 is invalid"); 208DbgUtil.AssertWin32(retVal != -1, "IntGetClipRgn([hdc=0x{0:X8}], [hRgn]) failed.", hDC.Handle); 218DbgUtil.AssertWin32(result != IntNativeMethods.RegionFlags.ERROR, "SelectClipRgn([hdc=0x{0:X8}], [hRegion=0x{1:X8}]) failed.", hDC.Handle, hRgn.Handle); 228DbgUtil.AssertWin32(result != IntNativeMethods.RegionFlags.ERROR, "GetRgnBox([hRegion=0x{0:X8}], [out rect]) failed.", hRgn.Handle); 255DbgUtil.AssertWin32(retVal, "DeleteObject(hObj=[0x{0:X8}]) failed.", hObject.Handle); 265DbgUtil.AssertWin32(retVal != 0, "GetObject(hObj=[0x{0:X8}], [LOGBRUSH]) failed.", hBrush.Handle); 276DbgUtil.AssertWin32(retVal != 0, "GetObject(hObj=[0x{0:X8}], [LOGFONT]) failed.", hFont.Handle); 288DbgUtil.AssertWin32(oldObj != IntPtr.Zero, "SelectObject(hdc=hObj=[0x{0:X8}], hObj=[0x{1:X8}]) failed.", hdc.Handle, obj.Handle); 346DbgUtil.AssertWin32(oldMode != 0, "SetBkMode(hdc=[0x{0:X8}], Mode=[{1}]) failed.", hDC.Handle, nBkMode ); 356DbgUtil.AssertWin32(mode != 0, "GetBkMode(hdc=[0x{0:X8}]) failed.", hDC.Handle); 400DbgUtil.AssertWin32( retVal != 0, "DrawText(hdc=[0x{0:X8}], text=[{1}], rect=[{2}], flags=[{3}] failed.", hDC.Handle, text, lpRect, nFormat ); 439DbgUtil.AssertWin32(retVal != 0, "DrawTextEx(hdc=[0x{0:X8}], text=[{1}], rect=[{2}], flags=[{3}] failed.", hDC.Handle, text, lpRect, nFormat ); 474DbgUtil.AssertWin32(retVal != 0, "GetTextExtentPoint32(hdc=[0x{0:X8}], text=[{1}], size=[{2}] failed.", hDC.Handle, text, size ); 492DbgUtil.AssertWin32(retVal, "LineTo(hdc=[0x{0:X8}], x=[{1}], y=[{2}] failed.", hdc.Handle, x, y ); 502DbgUtil.AssertWin32(retVal, "MoveToEx(hdc=[0x{0:X8}], x=[{1}], y=[{2}], pt=[{3}] failed.", hdc.Handle, x, y, pt ); 512DbgUtil.AssertWin32(retVal, "Rectangle(hdc=[0x{0:X8}], left=[{1}], top=[{2}], right=[{3}], bottom=[{4}] failed.", hdc.Handle, left, top, right, bottom ); 522DbgUtil.AssertWin32(retVal, "FillRect(hdc=[0x{0:X8}], rect=[{1}], hbrush=[{2}]", hDC.Handle, rect, hbrush.Handle); 532DbgUtil.AssertWin32(oldMapMode != 0, "SetMapMode(hdc=[0x{0:X8}], MapMode=[{1}]", hDC.Handle, nMapMode); 542DbgUtil.AssertWin32(mapMode != 0, "GetMapMode(hdc=[0x{0:X8}]", hDC.Handle); 552DbgUtil.AssertWin32(retVal, "GetViewportExtEx([hdc=0x{0:X8}], [out size]) failed.", hdc.Handle); 562DbgUtil.AssertWin32(retVal, "GetViewportOrgEx([hdc=0x{0:X8}], [out point]) failed.", hdc.Handle); 572DbgUtil.AssertWin32(retVal, "SetViewportExtEx([hdc=0x{0:X8}], x=[{1}], y=[{2}], [out size]) failed.", hDC.Handle, x, y); 581DbgUtil.AssertWin32(retVal, "SetViewportOrgEx([hdc=0x{0:X8}], x=[{1}], y=[{2}], [out point]) failed.", hDC.Handle, x, y); 632DbgUtil.AssertWin32(retVal != 0, "GetTextMetrics(hdc=[0x{0:X8}], [out TEXTMETRIC] failed.", hDC.Handle ); 642DbgUtil.AssertWin32(retVal, "BeginPath(hdc=[0x{0:X8}]failed.", hDC.Handle ); 652DbgUtil.AssertWin32(retVal, "EndPath(hdc=[0x{0:X8}]failed.", hDC.Handle); 662DbgUtil.AssertWin32(retVal, "StrokePath(hdc=[0x{0:X8}]failed.", hDC.Handle ); 672DbgUtil.AssertWin32(retVal, "AngleArc(hdc=[0x{0:X8}], ...) failed.", hDC.Handle); 702DbgUtil.AssertWin32(retVal, "Arc(hdc=[0x{0:X8}], ...) failed.", hDC.Handle); 718DbgUtil.AssertWin32(retVal, "Ellipse(hdc=[0x{0:X8}], x1=[{1}], y1=[{2}], x2=[{3}], y2=[{4}]) failed.", hDc.Handle, x1, y1, x2, y2);
winforms\Managed\System\WinForms\Application.cs (2)
3429if (hwndOwner.Handle != IntPtr.Zero) { 3487if (hwndOwner.Handle != IntPtr.Zero) {
winforms\Managed\System\WinForms\ComboBox.cs (1)
5879ACNativeWindow.RegisterACWindow(hRef.Handle, shouldSubClass);
winforms\Managed\System\WinForms\Control.cs (10)
10353Debug.Assert(hClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 10404SendMessage(NativeMethods.WM_PRINT, hDC.Handle, lParam); 11030if (parentHandle.Handle != IntPtr.Zero // the parent was not null 11031&& (Control.FromHandleInternal(parentHandle.Handle) == null || this.parent == null) // but wasnt a windows forms window 19262if (hBitmapDC.Handle == IntPtr.Zero || hMetafileDC.Handle == IntPtr.Zero || hBitmap.Handle == IntPtr.Zero) { 19289get { return hBitmapDC.Handle; } 19301if (hNullBitmap.Handle == IntPtr.Zero) return fSuccess; 19305if (hBitmap.Handle == IntPtr.Zero) return fSuccess;
winforms\Managed\System\WinForms\Form.cs (1)
3701if (icon != null && TaskbarOwner.Handle != IntPtr.Zero) {
winforms\Managed\System\WinForms\Label.cs (1)
1623using(Graphics g = Graphics.FromHdcInternal(hDC.Handle)) {
winforms\Managed\System\WinForms\Panel.cs (1)
295using(Graphics g = Graphics.FromHdcInternal(hDC.Handle)) {
winforms\Managed\System\WinForms\StatusStrip.cs (2)
195if (rootHwnd.Handle != IntPtr.Zero) { 567if (rootHwnd.Handle != IntPtr.Zero && !UnsafeNativeMethods.IsZoomed(rootHwnd)) {
winforms\Managed\System\WinForms\ToolStrip.cs (16)
2847IntPtr desthDC = hDC.Handle; 3676Graphics itemGraphics = Graphics.FromHdcInternal(itemHDC.Handle); 3718itemGraphics = Graphics.FromHdcInternal(itemHDC.Handle); 4534if ((thisHandle.Handle != otherHandle.Handle) && 4542if (thisHwndRoot.Handle == otherHwndRoot.Handle && (thisHwndRoot.Handle != IntPtr.Zero)) { 4543Debug.WriteLineIf(SnapFocusDebug.TraceVerbose, "[ToolStrip SnapFocus]: Caching for return focus:" + WindowsFormsUtils.GetControlInformation(otherHandle.Handle)); 4545hwndThatLostFocus = otherHandle.Handle; 4732if (rootHwnd.Handle != IntPtr.Zero) { 4736if (hwndActive != rootHwnd.Handle) { 5167if (rootHwnd.Handle == m.HWnd || UnsafeNativeMethods.IsChild(rootHwnd, new HandleRef(this,m.HWnd))) { 5229if (cachedItemHDC.Handle == IntPtr.Zero) { 5257if (cachedItemHDC.Handle != IntPtr.Zero) { 5259if (cachedItemBitmap.Handle != IntPtr.Zero) {
winforms\Managed\System\WinForms\ToolStripManager.cs (21)
256return (WindowsFormsUtils.GetRootHWnd(control1).Handle == WindowsFormsUtils.GetRootHWnd(control2).Handle); 790if (_activeHwnd.Handle != value.Handle) { 794if (_activeHwnd.Handle != IntPtr.Zero) { 795control = Control.FromHandleInternal(_activeHwnd.Handle); 804control = Control.FromHandleInternal(_activeHwnd.Handle); 914if (ActiveHwnd.Handle != IntPtr.Zero) { 916Control control = Control.FromHandleInternal(ActiveHwnd.Handle); 1203if (hwndParent.Handle == hwndChild.Handle) { 1250if (hwndCurrentActiveWindow.Handle != _lastActiveWindow.Handle) { 1252if (hwndCurrentActiveWindow.Handle == IntPtr.Zero) { 1254Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.PreFilterMessage] Dismissing because: " + WindowsFormsUtils.GetControlInformation(hwndCurrentActiveWindow.Handle) + " has gotten activation. "); 1257else if (!(Control.FromChildHandleInternal(hwndCurrentActiveWindow.Handle) is ToolStripDropDown) // its NOT a dropdown 1260Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.PreFilterMessage] Calling ProcessActivationChange because: " + WindowsFormsUtils.GetControlInformation(hwndCurrentActiveWindow.Handle) + " has gotten activation. "); 1643rootWindowsMatch = (rootWindowOfToolStrip.Handle == rootWindowOfControl.Handle); 1647Form mainForm = Control.FromHandleInternal(rootWindowOfControl.Handle) as Form; 1748if (topmostParentOfMenu.Handle == foregroundWindow) {
winforms\Managed\System\WinForms\ToolStripTextBox.cs (5)
744if (hNonClientRegion.Handle != IntPtr.Zero) { 750if (hClientRegion.Handle != IntPtr.Zero) { 755if (hTotalRegion.Handle != IntPtr.Zero) { 853if (hdc.Handle == IntPtr.Zero) { 867using (Graphics g = Graphics.FromHdcInternal(hdc.Handle)) {
winforms\Managed\System\WinForms\WinFormsUtils.cs (6)
288IntPtr rootHwnd = UnsafeNativeMethods.GetAncestor(new HandleRef(hwnd, hwnd.Handle), NativeMethods.GA_ROOT); 610if (hDC.Handle == IntPtr.Zero) { 621this.dc = DeviceContext.FromHdc(hDC.Handle); 631Debug.Assert(hClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 637Debug.Assert(hOriginalClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 700if (hOriginalClippingRegion.Handle != IntPtr.Zero) {
WindowsBase (2)
Base\System\Windows\SplashScreen.cs (2)
223IntPtr hOldBitmap = UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hBitmap.MakeHandleRef(null).Handle); 369UnsafeNativeMethods.DeleteObject(_hBitmap.MakeHandleRef(null).Handle);