Implemented interface member:
property
Handle
System.Windows.Forms.IWin32Window.Handle
124 references to Handle
System.Windows.Forms (110)
winforms\Managed\System\WinForms\ComboBox.cs (40)
379childEditAccessibleObject = new ComboBoxChildEditUiaProvider(this, childEdit.Handle); 390new ComboBoxChildListUiaProvider(this, DropDownStyle == ComboBoxStyle.Simple ? childListBox.Handle : dropDownHandle); 655return focus != IntPtr.Zero && ((childEdit != null && focus == childEdit.Handle) || (childListBox != null && focus == childListBox.Handle)); 1132UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_REPLACESEL, NativeMethods.InvalidIntPtr, str); 1613UnsafeNativeMethods.GetWindowRect(new HandleRef(this, childEdit.Handle), ref editRectMid); 1633if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == childListBox.Handle) { 1646if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == childListBox.Handle) { 1676if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == childListBox.Handle) { 1695if (DropDownStyle == ComboBoxStyle.Simple && m.HWnd == childListBox.Handle) { 1765if (childEdit != null && m.HWnd == childEdit.Handle) { 1766UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_SETMARGINS, 1944if (Cursor != DefaultCursor && childEdit != null && m.HWnd == childEdit.Handle && NativeMethods.Util.LOWORD(m.LParam) == NativeMethods.HTCLIENT) { 1995if (m.HWnd == childEdit.Handle) { 2045if (childEdit != null && childEdit.Handle != IntPtr.Zero) { 2046SafeNativeMethods.InvalidateRect(new HandleRef(this, childEdit.Handle), null, false); 2048if (childListBox != null && childListBox.Handle != IntPtr.Zero) { 2049SafeNativeMethods.InvalidateRect(new HandleRef(this, childListBox.Handle), null, false); 2185return DropDownStyle == ComboBoxStyle.Simple ? childListBox.Handle : dropDownHandle; 2456UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_SETMARGINS, 3094ReleaseUiaProvider(childListBox.Handle); 3105ReleaseUiaProvider(childDropDown.Handle); 3162SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3169if (!stringSource.Bind(new HandleRef(this, childEdit.Handle), (int)AutoCompleteMode)) { 3186SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3193if (!stringSource.Bind(new HandleRef(this, childEdit.Handle), (int)AutoCompleteMode)) { 3209SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3226int ret = SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), (int)AutoCompleteSource | mode); 3236SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3439if (childEdit != null && childEdit.Handle != IntPtr.Zero) { 3440UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.WM_SETTEXT, IntPtr.Zero, s); 3484ReleaseUiaProvider(childListBox.Handle); 3912return new ChildAccessibleObject(_owner, Handle); 3937new HandleRef(this, Handle), 3965: new ChildAccessibleObject(_owner, Handle); 4912if (hwnd == _owningComboBox.childEdit.Handle) { 4916hwnd == _owningComboBox.childListBox.Handle || 5779return SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle)); 5808Debug.Assert(ACWindows.ContainsKey(this.Handle)); 5809ACWindows.Remove(this.Handle); //so we do not leak ac windows.
winforms\Managed\System\WinForms\CommonDialog.cs (1)
290hwndOwner = native.Handle;
winforms\Managed\System\WinForms\Control.cs (3)
2874return window.Handle; 2971get { return window.Handle != IntPtr.Zero; } 14578target.OnHandleChange(this.Handle);
winforms\Managed\System\WinForms\DataGridToolTip.cs (7)
36if (tipWindow == null || tipWindow.Handle == IntPtr.Zero) 49UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 50SafeNativeMethods.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_NOTOPMOST, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE); 51UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0); 59Debug.Assert(tipWindow != null && tipWindow.Handle != IntPtr.Zero, "the tipWindow was not initialized, bailing out"); 73UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 82UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo);
winforms\Managed\System\WinForms\ErrorProvider.cs (18)
919toolInfo.hwnd = Handle; 923UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 941if (Handle == IntPtr.Zero) { 963cparams.Parent = Handle; 969UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 970SafeNativeMethods.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE); 971UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0); 994SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), 1066IntPtr hdc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, Handle), ref ps); 1082UnsafeNativeMethods.EndPaint(new HandleRef(this, Handle), ref ps); 1133toolInfo.hwnd = Handle; 1135UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo); 1223toolInfo.hwnd = Handle; 1231UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETTOOLINFO, 0, toolInfo); 1244dc = DeviceContext.FromHwnd(this.Handle); 1258if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(windowRegion, windowRegionHandle), true) != 0) { 1278SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, windowBounds.X, windowBounds.Y, 1280SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), null, false);
winforms\Managed\System\WinForms\Form.cs (15)
2515if (ownerWindow.Handle == IntPtr.Zero) { 2521return new HandleRef(ownerWindow, ownerWindow.Handle); 7835if (window.Handle != IntPtr.Zero) { 7879SafeNativeMethods.SetWindowPos(new HandleRef(window, window.Handle), NativeMethods.HWND_TOPMOST, 7884UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, owner.Width); 7886UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_SETTITLE, NativeMethods.TTI_WARNING, SR.GetString(SR.SecurityToolTipCaption)); 7888if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO())) { 7892UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ACTIVATE, 1, 0); 7899if (window.Handle != IntPtr.Zero) { 7918UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7930UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetTOOLINFO()); 7931UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO()); 7932UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO()); 7938UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7939UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, GetTOOLINFO());
winforms\Managed\System\WinForms\NotifyIcon.cs (11)
484if (window != null && window.Handle != IntPtr.Zero) { 485UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_CLOSE, 0, 0); 694if (window.Handle == IntPtr.Zero) { 697data.hWnd = window.Handle; 729UnsafeNativeMethods.SetForegroundWindow(new HandleRef(window, window.Handle)); 738new HandleRef(window, window.Handle), 742UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 774if (window.Handle == IntPtr.Zero) { 778data.hWnd = window.Handle; 1005if (Handle != IntPtr.Zero) { 1006UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CLOSE, 0, 0);
winforms\Managed\System\WinForms\StatusBar.cs (3)
1697if (window.Handle == IntPtr.Zero) { 1700return window.Handle; 1705get { return window.Handle != IntPtr.Zero;}
winforms\Managed\System\WinForms\Timer.cs (8)
310return _timerID != 0 && Handle != IntPtr.Zero; 318if (Handle == IntPtr.Zero) { 338Debug.Assert(Handle != IntPtr.Zero, "Timer HWND creation failed!"); 339return Handle != IntPtr.Zero; 367_timerID = (int) SafeNativeMethods.SetTimer(new HandleRef(this, Handle), TimerID++, interval, IntPtr.Zero); 386hWnd = Handle; 449Debug.Assert(m.HWnd == Handle && Handle != IntPtr.Zero, "Timer getting messages for other windows?");
winforms\Managed\System\WinForms\ToolStrip.cs (1)
793if (dropDownOwnerWindow.Handle == IntPtr.Zero) {
winforms\Managed\System\WinForms\ToolStripDropDown.cs (1)
1679HandleRef ownerHandle = new HandleRef(ownerWindow, ownerWindow.Handle);
winforms\Managed\System\WinForms\ToolTip.cs (2)
301return window.Handle; 1125return (window != null ? window.Handle != IntPtr.Zero: false);
System.Workflow.ComponentModel (14)
AuthoringOM\Design\DesignerWidgets.cs (14)
2217if (NativeMethods.IsWindowVisible(this.infoTip.Handle)) 2245if (NativeMethods.IsWindowVisible(this.inplaceTip.Handle)) 2259if (notifyHeader != null && notifyHeader.hwndFrom == this.inplaceTip.Handle && notifyHeader.code == NativeMethods.TTN_SHOW) 2262int result = NativeMethods.SetWindowPos(this.inplaceTip.Handle, IntPtr.Zero, screenCoOrd.X, screenCoOrd.Y, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE); 2291if (IntPtr.Zero == Handle) 2319IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_ACTIVATE, activateValue, IntPtr.Zero); 2325IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_POP, IntPtr.Zero, IntPtr.Zero); 2330IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETMAXTIPWIDTH, IntPtr.Zero, new IntPtr(tipWidth)); 2335IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETDELAYTIME, new IntPtr(time), new IntPtr(delay)); 2344IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETTITLE, new IntPtr((int)ToolTipIcon.None), titleStr); 2359IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_UPDATETIPTEXT, IntPtr.Zero, ref toolInfo); 2375IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_NEWTOOLRECT, IntPtr.Zero, ref toolInfo); 2380IntPtr retVal = NativeMethods.SendMessage(Handle, NativeMethods.TTM_ADDTOOL, IntPtr.Zero, ref toolInfo); 2386IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_DELTOOL, IntPtr.Zero, ref toolInfo);