Implemented interface member:
property
Handle
System.Windows.Forms.IWin32Window.Handle
647 references to Handle
System.Web.Mobile (10)
UI\MobileControls\Design\Util\MSHTMLHost.cs (10)
58Debug.Assert(Handle != IntPtr.Zero, 96Debug.Assert((parent != null) && (parent.Handle != IntPtr.Zero), 118NativeMethods.GetClientRect(parentControl.Handle, r); 160NativeMethods.GetClientRect(parentControl.Handle, r); 176return parentControl.Handle; 198NativeMethods.GetClientRect(parentControl.Handle, lprcPosRect); 199NativeMethods.GetClientRect(parentControl.Handle, lprcClipRect); 203lpFrameInfo.hwndFrame = parentControl.Handle; 390NativeMethods.GetClientRect(parentControl.Handle, r); 391tridentOleObject.DoVerb(NativeMethods.OLEIVERB_UIACTIVATE, IntPtr.Zero, (NativeMethods.IOleClientSite)this, 0, parentControl.Handle, r);
System.Windows.Forms (625)
winforms\Managed\System\WinForms\Application.cs (11)
1326cp.Parent = cxt.GetParkingWindow(dpiAwarenessContext).Handle; 2865int hwndThread = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(parkingWindows[0], parkingWindows[0].Handle), out pid); 3428hwndOwner = new HandleRef(null, UnsafeNativeMethods.GetWindowLong(new HandleRef(currentForm, currentForm.Handle), NativeMethods.GWL_HWNDPARENT)); 3445SafeNativeMethods.IsWindowEnabled(new HandleRef(currentForm, currentForm.Handle)) != modalEnabled) { 3446SafeNativeMethods.EnableWindow(new HandleRef(currentForm, currentForm.Handle), modalEnabled); 4167IntPtr hwndChild = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 4187UnsafeNativeMethods.SetParent(handle, new HandleRef(this, Handle)); 4196Debug.Assert(UnsafeNativeMethods.GetParent(handle) != Handle, "Always set the handle's parent to someone else before calling UnparkHandle"); 4211UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero); 4291focusedHwnd = activatingControl.Handle; 4345IntPtr parentHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, MainForm.Handle), NativeMethods.GWL_HWNDPARENT);
winforms\Managed\System\WinForms\AxHost.cs (11)
1204if (IsHandleCreated) return Handle; 1614IntPtr handle = Handle; 2114msg.hwnd = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.Handle; 2470GetOleObject().DoVerb(verb, IntPtr.Zero, oleSite, -1, parent != null ? parent.Handle : IntPtr.Zero, FillInRect(new NativeMethods.COMRECT(), Bounds)); 3308opcparams.hwndOwner = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.Handle; 3380IntPtr handle = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.Handle; 3591wndprocAddr = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_WNDPROC); 4230return parent != null ? parent.Handle : IntPtr.Zero; 4277lpFrameInfo.hwndFrame = host.ParentInternal.Handle; 5963return parent.Handle; 6333return GetP().Handle;
winforms\Managed\System\WinForms\Button.cs (1)
306if (UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle && !ValidationCancelled) {
winforms\Managed\System\WinForms\CheckBox.cs (1)
648if (UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle) {
winforms\Managed\System\WinForms\CheckedListBox.cs (3)
551SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), ref rect, false); 880SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), null, true); 1672UnsafeNativeMethods.ClientToScreen(new HandleRef(ParentCheckedListBox, ParentCheckedListBox.Handle), pt);
winforms\Managed\System\WinForms\ColumnHeader.cs (3)
397IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.Handle), NativeMethods.LVM_GETHEADER, 0, 0); 401width = (int)UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, Index, 0); 475 UnsafeNativeMethods.SendMessage(new HandleRef(this.listview, this.listview.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, cols.Length, cols);
winforms\Managed\System\WinForms\ComboBox.cs (27)
1152UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETEDITSEL, start, end); 1173UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETEDITSEL, value, (int[])null); 1608UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref comboRectMid); 1838UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 1930UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_CONTEXTMENU, m.WParam, m.LParam); 1983UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref rect); 2293SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 2359UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETLBTEXT, index, sb); 2440IntPtr hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 3454SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rect); 3689UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_MOUSELEAVE, 0, 0); 3724UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 3763NativeMethods.RegionFlags updateRegionFlags = (NativeMethods.RegionFlags)SafeNativeMethods.GetUpdateRgn(new HandleRef(this, this.Handle), new HandleRef(this, wr.HRegion), true); 3775dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, Handle), ref ps); 3799UnsafeNativeMethods.EndPaint(new HandleRef(this, Handle), ref ps); 4442Debug.Assert(owner != null && owner.Handle != IntPtr.Zero, "ComboBox's handle hasn't been created"); 4547runtimeId[1] = (int)(long)ownerItem.Handle; 4778runtimeId[1] = (int)(long)_owningComboBox.Handle; 4885return (_dropDownButtonUiaProvider ?? new ComboBoxChildDropDownButtonUiaProvider(_owningComboBox, _owningComboBox.Handle)); 4984return _owningComboBox.Handle; 5370runtimeId[1] = (int)(long)_owningComboBox.Handle; 5522runtimeId[1] = (int)(long)_owner.Handle; 5729runtimeId[1] = (int)(long)_owner.Handle; 6110SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6115SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6120SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6125SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect);
winforms\Managed\System\WinForms\ContainerControl.cs (4)
679UnsafeNativeMethods.SetFocus(new HandleRef(activeControl, activeControl.Handle)); 698UnsafeNativeMethods.SetFocus(new HandleRef(cc, cc.Handle)); 716UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), ref clientRectangle); 718UnsafeNativeMethods.ClientToScreen(new HandleRef(this, this.Handle), topLeftPoint);
winforms\Managed\System\WinForms\ContextMenu.cs (1)
235new HandleRef(control, control.Handle),
winforms\Managed\System\WinForms\Control.cs (127)
1405bool visible = SafeNativeMethods.IsWindowVisible(new HandleRef(window, Handle)); 1406bool enabled = SafeNativeMethods.IsWindowEnabled(new HandleRef(window, Handle)); 1475return IsHandleCreated && UnsafeNativeMethods.GetCapture() == Handle; 1480UnsafeNativeMethods.SetCapture(new HandleRef(this, Handle)); 1674if (focusHwnd == this.Handle) { 1678if (UnsafeNativeMethods.IsChild(new HandleRef(this, this.Handle), new HandleRef(this, focusHwnd))) { 2020return SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, Handle), out pid); 2089UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2091if ((r.left <= p.x && p.x < r.right && r.top <= p.y && p.y < r.bottom) || UnsafeNativeMethods.GetCapture() == Handle) 2092SendMessage(NativeMethods.WM_SETCURSOR, Handle, (IntPtr)NativeMethods.HTCLIENT); 2479return IsHandleCreated && UnsafeNativeMethods.GetFocus() == Handle; 2929IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 3000UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref temp); 3008start = parent.Handle; 3011start = Handle; 3055return Handle; 3087hwnd = new HandleRef(this, Handle); 3096hwnd = new HandleRef(marshalingControl, marshalingControl.Handle); 3592if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(this, regionHandle), SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle))) != 0) { 4219UnsafeNativeMethods.SendMessage(new HandleRef(TopMostParent, TopMostParent.Handle), 4262UnsafeNativeMethods.SendMessage(new HandleRef(TopMostParent, TopMostParent.Handle), 4472return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE)); 4475UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)value)); 4485return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE)); 4488UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)value)); 4538int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(window, Handle)); 4546UnsafeNativeMethods.GetWindowText(new HandleRef(window, Handle), sb, sb.Capacity); 4554UnsafeNativeMethods.SetWindowText(new HandleRef(window, Handle), value); 5293UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), objectID, childID + 1); 5615else if (IsHandleCreated && GetTopLevel() && SafeNativeMethods.IsWindowEnabled(new HandleRef(window, Handle))) { 5616SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, 5763return Graphics.FromHwndInternal(this.Handle); 5896ctl.SetParentHandle(Handle); 5948if (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, Handle), threadCallbackMessage, 6174UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)hDc, 6214if (SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(marshaler, marshaler.Handle), out pid) == SafeNativeMethods.GetCurrentThreadId()) { 6370UnsafeNativeMethods.SetFocus(new HandleRef(this, Handle)); 6485IntPtr hwnd = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, Handle), pt.X, pt.Y, value); 6820ArrayList windows = GetChildWindows(this.Handle); 7046hWnd = control.Handle; 7107trackMouseEvent.hwndTrack = Handle; 7218SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 7228SafeNativeMethods.InvalidateRgn(new HandleRef(this, Handle), 7269SafeNativeMethods.RedrawWindow(new HandleRef(window, Handle), 7279SafeNativeMethods.InvalidateRect(new HandleRef(window, Handle), 7314SafeNativeMethods.RedrawWindow(new HandleRef(window, Handle), 7328SafeNativeMethods.InvalidateRect(new HandleRef(window, Handle), 7805if (SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, Handle), out pid) == SafeNativeMethods.GetCurrentThreadId()) { 7838UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 8170SafeNativeMethods.EnableWindow(new HandleRef(this, Handle), Enabled); 8405UnsafeNativeMethods.SetParent(new HandleRef(this, this.Handle), new HandleRef(parent, parent.Handle)); 8435Application.ParkHandle(new HandleRef(this, this.Handle), this.DpiAwarenessContext); 8524m = Message.Create(this.Handle, NativeMethods.WM_PRINTCLIENT, hdc, flags); 8752if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(this, regionHandle), SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle))) != 0) { 8770IntPtr handle = Handle; 8792UnsafeNativeMethods.SetWindowText(new HandleRef(this, Handle), text); 8817UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 8833if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ,si) != false) { 10090UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), point, 1); 10107UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, point, 1); 10379bool success = UnsafeNativeMethods.GetWindowRect(new HandleRef(null, this.Handle), ref windowRect); 10825new HandleRef(topMostParent, topMostParent.Handle), 10826UnsafeNativeMethods.GetParent(new HandleRef(null, topMostParent.Handle)) == IntPtr.Zero ? NativeMethods.WM_CHANGEUISTATE : NativeMethods.WM_UPDATEUISTATE, 10857IntPtr hwnd = this.Handle; 10970HandleRef parentHandle = new HandleRef(this, UnsafeNativeMethods.GetParent(new HandleRef(this, this.Handle))); 11036UnsafeNativeMethods.SetParent(new HandleRef(this, this.Handle), parentHandle); 11062UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), ref rect, 2); 11079UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, ref rect, 2); 11244Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Registering as drop target: " + Handle.ToString()); 11246int n = UnsafeNativeMethods.RegisterDragDrop(new HandleRef(this, Handle), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this))); 11253Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Revoking drop target: " + Handle.ToString()); 11255int n = UnsafeNativeMethods.RevokeDragDrop(new HandleRef(this, Handle)); 11732return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11741return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, ref wparam, ref lparam); 11745return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, (IntPtr)wparam, lparam); 11750return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11755return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, (IntPtr)lparam); 11764return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, ref lparam); 11773return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11782return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11793SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.HWND_BOTTOM, 0, 0, 0, 0, 11898SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.NullHandleRef, x, y, width, height, flags); 11971IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(window, Handle)); 11974Debug.Assert(Handle != value, "Cycle created in SetParentHandle"); 11998Application.ParkHandle(new HandleRef(window, Handle), this.DpiAwarenessContext); 12002UnsafeNativeMethods.SetParent(new HandleRef(window, Handle), new HandleRef(null, value)); 12006Application.UnparkHandle(new HandleRef(window, Handle), window.DpiAwarenessContext); 12014UnsafeNativeMethods.SetParent(new HandleRef(window, Handle), new HandleRef(null, IntPtr.Zero)); 12015Application.UnparkHandle(new HandleRef(window, Handle), window.DpiAwarenessContext); 12131SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), value ? ShowParams : NativeMethods.SW_HIDE); 12144SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), 12183if (!SafeNativeMethods.IsWindowVisible(new HandleRef(this,this.Handle))) { 12198new HandleRef(window, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | 12418int styleFlags = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 12419UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)(value? styleFlags | flag: styleFlags & ~flag))); 12672IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 12701prevHandle = c.Handle; 12705if (UnsafeNativeMethods.GetWindow(new HandleRef(ctl.window, ctl.Handle), NativeMethods.GW_HWNDPREV) != prevHandle) { 12708SafeNativeMethods.SetWindowPos(new HandleRef(ctl.window, ctl.Handle), new HandleRef(null, prevHandle), 0, 0, 0, 0, 12756new HandleRef(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 12795IntPtr parentHandle = Handle; 12965UnsafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rc); 13045new HandleRef(this, Handle), 13302ReleaseUiaProvider(Handle); 13503SendMessage(NativeMethods.WM_CONTEXTMENU, this.Handle, NativeMethods.Util.MAKELPARAM(pt.X, pt.Y)); 13510if (GetState(STATE_MOUSEPRESSED) && !IsDisposed && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle) { 13668hWnd = this.Handle; 13794Debug.WriteLineIf(Control.PaletteTracing.TraceVerbose, Handle + ": WM_QUERYNEWPALETTE"); 13795IntPtr dc = UnsafeNativeMethods.GetDC(new HandleRef(this, Handle)); 13801UnsafeNativeMethods.ReleaseDC(new HandleRef(this, Handle), new HandleRef(null, dc)); 13873hWnd = UnsafeNativeMethods.GetDlgItem(new HandleRef(this, Handle), NativeMethods.Util.HIWORD(m.WParam)); 16194UnsafeNativeMethods.GetWindowRect(new HandleRef(this, this.Handle), ref rectangle); 16568if (msg.hwnd != control.Handle && msg.message >= NativeMethods.WM_MOUSEFIRST && msg.message <= NativeMethods.WM_MOUSELAST) { 16576UnsafeNativeMethods.MapWindowPoints(new HandleRef(null, hwndMap), new HandleRef(control, control.Handle), pt, 1); 16584UnsafeNativeMethods.MapWindowPoints(new HandleRef(target, target.Handle), new HandleRef(realTarget, realTarget.Handle), pt, 1); 17011hwnd = control.Handle; 17105UnsafeNativeMethods.SetParent(new HandleRef(control, control.Handle), new HandleRef(null, hwndParent)); 18407IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(control, control.Handle)); 18412UnsafeNativeMethods.MapWindowPoints(new HandleRef(null, hWndParent), new HandleRef(control, control.Handle), ref rcIntersect, 2); 18438UnsafeNativeMethods.SetWindowRgn(new HandleRef(control, control.Handle), new HandleRef(this, finalClipRegion), SafeNativeMethods.IsWindowVisible(new HandleRef(control, control.Handle))); 19432IntPtr handle = ownerControl.Handle; 19460IntPtr handle = ownerControl.Handle;
winforms\Managed\System\WinForms\Control.Ime.cs (4)
170return ImeContext.GetImeMode( this.Handle ); 504ImeContext.SetImeStatus( newImeContextMode, this.Handle ); 789OnImeContextStatusChanged( this.Handle ); 857ImeContext.SetImeStatus(PropagatingImeMode, topMostWinformsParent.Handle);
winforms\Managed\System\WinForms\DataGrid.cs (4)
2299SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 5856IntPtr parentHandle = Handle; 8629SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 0, deltaY, ref scrollArea, ref scrollArea); 8883SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 0, -parentRowsRect.Height, ref scrollRECT, ref scrollRECT);
winforms\Managed\System\WinForms\DataGridToolTip.cs (3)
43cparams.Parent = dataGrid.Handle; 68toolInfo.hwnd = dataGrid.Handle; 80toolInfo.hwnd = dataGrid.Handle;
winforms\Managed\System\WinForms\DataGridViewBand.cs (1)
814IntPtr handle = this.DataGridView.Handle;
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (5)
840UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, cachedDropDownWidth, 0); 847int dropDownWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_GETDROPPEDWIDTH, 0, 0)); 850UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, this.DropDownWidth, 0); 1526h = comboBox.ParentInternal.Handle; 1528h = comboBox.Handle; // make sure that assigning the DataSource property does not assert.
winforms\Managed\System\WinForms\DataGridViewMethods.cs (4)
5766IntPtr parentHandle = this.Handle; 5787IntPtr parentHandle = this.Handle; 26360SafeNativeMethods.ScrollWindow(new HandleRef(this, this.Handle), 26471SafeNativeMethods.ScrollWindow(new HandleRef(this, this.Handle), 0, deltaY, ref scrollArea, ref scrollArea);
winforms\Managed\System\WinForms\DateTimePicker.cs (10)
418int gdt = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_GETSYSTEMTIME, 0, sys); 431UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 436UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1036UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1149UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1154UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1380UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1457UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETRANGE, flags, sa); 1574UnsafeNativeMethods.EnumChildWindows(new HandleRef(this, Handle), cb, NativeMethods.NullHandleRef); 1662if (m.HWnd == Handle) {
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (2)
778itemHeight = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_GETITEMHEIGHT, 0, 0); 780UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_SETITEMHEIGHT, itemHeight, 0);
winforms\Managed\System\WinForms\ErrorProvider.cs (1)
954cparams.Parent = parent.Handle;
winforms\Managed\System\WinForms\Form.cs (59)
1778SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef, 2104int exStyle = unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE)); 2107UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)cp.ExStyle)); 2577SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), key, 0, 0, 0, 0, 2684UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_SHOWWINDOW, value ? 1 : 0, 0); 2713SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), NativeMethods.SW_SHOW); 2786IntPtr hWnd = Handle; 3088MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE, Handle, 0); 3091UnsafeNativeMethods.SetForegroundWindow(new HandleRef(this, Handle)); 3342IntPtr hmenu = UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Handle), false); 3431IntPtr h = Handle; 3696UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, TaskbarOwner); 3778m.Result = UnsafeNativeMethods.DefFrameProc(m.HWnd, ctlClient.Handle, m.Msg, m.WParam, m.LParam); 4030IntPtr ownerHandle = (dialogOwner != null) ? Control.GetSafeHandle(dialogOwner) : OwnerInternal.Handle; 4082MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE, Handle, 0); 4452ownerHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 4497hWndOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 5000UnsafeNativeMethods.ClientToScreen(new HandleRef(this, Handle), ptToSnap); 5293if (ctlClient != null && ctlClient.Handle != IntPtr.Zero && 5294UnsafeNativeMethods.TranslateMDISysAccel(ctlClient.Handle, ref win32Message)) { 5514UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, Handle), ref wp); 5533new HandleRef(this, this.Handle)); 5544etwcb.SetOwners(new HandleRef(this, this.Handle)); 5552UnsafeNativeMethods.SetWindowPlacement(new HandleRef(this, Handle), ref wp); 5708if (IsHandleCreated && UnsafeNativeMethods.GetForegroundWindow() == this.Handle) { 5713else if (!IsHandleCreated || UnsafeNativeMethods.GetForegroundWindow() != this.Handle) 5767UnsafeNativeMethods.SetActiveWindow(new HandleRef(this, Handle)); 5770UnsafeNativeMethods.SetActiveWindow(new HandleRef(MdiParentInternal, MdiParentInternal.Handle)); 5771MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE, Handle, 0); 6105if (hWndOwner != IntPtr.Zero && hWndOwner != Handle) { 6107if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) { 6113hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 6114UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner)); 6206if (hWndOwner != IntPtr.Zero && hWndOwner != Handle) { 6208if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) { 6214hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 6215UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner)); 6434ownerHwnd = new HandleRef(owner, owner.Handle); 6442UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHwnd); 6458result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA); 6462result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey), 0, NativeMethods.LWA_COLORKEY); 6465result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey), 6520UnsafeNativeMethods.SetMenu(new HandleRef(this, Handle), new HandleRef(menu, menu.Handle)); 6523UnsafeNativeMethods.SetMenu(new HandleRef(this, Handle), NativeMethods.NullHandleRef); 6547UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, dummyMenu.Handle, IntPtr.Zero); 6553UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, menu.Handle, IntPtr.Zero); 6559IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.Handle)); 6565UnsafeNativeMethods.SetMenu(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef); 6582SafeNativeMethods.DrawMenuBar(new HandleRef(this, Handle)); 6700IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.Handle)); 6830SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 6848UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, Handle), ref wp); 7260UnsafeNativeMethods.PostMessage(new HandleRef(formMdiParent, formMdiParent.Handle), NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), m.WParam); 7290if (Handle == m.WParam) { 7293else if (Handle == m.LParam) { 7363UnsafeNativeMethods.ScreenToClient(new HandleRef(this, this.Handle), pt ); 7816cp.Parent = owner.Handle; 7852toolInfo.hwnd = owner.Handle; 7864toolInfo.uId = owner.Handle;
winforms\Managed\System\WinForms\GroupBox.cs (1)
771SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rect);
winforms\Managed\System\WinForms\Help.cs (2)
224handle = new HandleRef(parent, parent.Handle); 315handle = new HandleRef(parent, parent.Handle);
winforms\Managed\System\WinForms\Label.cs (1)
1345using( WindowsGraphics wg = WindowsGraphics.FromHwnd(this.Handle) ){
winforms\Managed\System\WinForms\LinkLabel.cs (4)
406UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 409if ((r.left <= p.x && p.x < r.right && r.top <= p.y && p.y < r.bottom) || UnsafeNativeMethods.GetCapture() == Handle) 410SendMessage(NativeMethods.WM_SETCURSOR, Handle, NativeMethods.HTCLIENT); 2717g = Graphics.FromHwnd(link.Owner.Handle);
winforms\Managed\System\WinForms\ListBox.cs (7)
1565UnsafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref r); 1616UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_GETTEXT, index, sb); 1708UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_GETSELITEMS, count, result); 1782UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets); 2269UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets); 2417if (captured && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle) { 2464if (rCaptured && UnsafeNativeMethods.WindowFromPoint(rpt.X, rpt.Y) == Handle) {
winforms\Managed\System\WinForms\ListView.cs (48)
446UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage); 688int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1642UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETTILEVIEWINFO, 0, tileViewInfo); 1663bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTILEVIEWINFO, 0, tileViewInfo); 2242UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_ARRANGE, (int) value, 0); 3063UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_ENSUREVISIBLE, index, 0); 3184int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 3286displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_FINDITEM, lastIndex - 1, ref info); 3290displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_FINDITEM, -1 /* beginning */, ref info); 3339int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 3366int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi); 3379UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETITEMPOSITION, index, pt); 3553iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi)); 3555iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_HITTEST, 0, lvhi)); 3586IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 3692return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_INSERTCOLUMN, index, lvColumn); 3743int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,this.Handle),NativeMethods.LVM_INSERTGROUP,index,lvgroup); 3940insertIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_INSERTITEM, 0, ref lvItem); 4281int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 4283UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 4288int callbackMask = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETCALLBACKMASK, 0, 0)); 4290UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETCALLBACKMASK, callbackMask, 0); 4567IntPtr hdrHWND = UnsafeNativeMethods.GetWindow(new HandleRef(this, this.Handle), NativeMethods.GW_CHILD); 4587UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), prc); 4697int retval = (int) UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 4761int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_REMOVEGROUP, group.ID, IntPtr.Zero); 4771UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SCROLL, 0, scrollY); 4826UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage); 4895int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETCOLUMN, ch.Index, lvColumn); 4981UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, orderedColumns.Length, orderedColumns); 5045IntPtr oldHandle = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 5058UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 5071UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 5086UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMPOSITION32, index, pt); 5100UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMSTATE, index, ref lvItem); 5120int colWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, 0, 0)); 5142UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMTEXT, itemIndex, ref lvItem); 5180UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SORTITEMS, IntPtr.Zero, callback); 5313int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 5352bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this,Handle),NativeMethods.LVM_SETTILEVIEWINFO,0,tileViewInfo); 5369int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5399int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5774IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 5791return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 8984UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem); 9003int nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, -1, NativeMethods.LVNI_SELECTED); 9013nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, nextSelected, NativeMethods.LVNI_SELECTED); 9025UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_DELETEALLITEMS, 0, 0);
winforms\Managed\System\WinForms\ListViewInsertionMark.cs (2)
127UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_INSERTMARKHITTEST, point, lvInsertMark); 137UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_SETINSERTMARK, 0, lvInsertMark);
winforms\Managed\System\WinForms\ListViewItem.cs (3)
962UnsafeNativeMethods.SendMessage(new HandleRef(lv, lv.Handle), NativeMethods.LVM_EDITLABEL, Index, 0); 1165UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 1193UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem);
winforms\Managed\System\WinForms\MaskedTextBox.cs (2)
1201HandleRef handle = new HandleRef(this, this.Handle); 2007SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
winforms\Managed\System\WinForms\MDIClient.cs (6)
166if (Handle == IntPtr.Zero) 192if (site != null && site.DesignMode && Handle != IntPtr.Zero) { 260UnsafeNativeMethods.GetWindowPlacement(new HandleRef(child, child.Handle), ref wp); 271UnsafeNativeMethods.SetWindowPlacement(new HandleRef(child, child.Handle), ref wp); 309if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(null, rgn1), true) == 0) { 356if (ParentInternal != null && ParentInternal.Site != null && ParentInternal.Site.DesignMode && Handle != IntPtr.Zero) {
winforms\Managed\System\WinForms\MenuItem.cs (1)
1478SafeNativeMethods.DrawMenuBar(new HandleRef(f, f.Handle));
winforms\Managed\System\WinForms\MonthCalendar.cs (8)
1059int res = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_GETTODAY, 0, st); 1525UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_GETMONTHRANGE, flag, sa); 1575UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_HITTEST, 0, mchi); 1637UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETTODAY, 0, st); 2027if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETRANGE, flag, sa) == 0) 2163UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETSELRANGE , 0, sa); 2263UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETTODAY, 0, st); 2386if (m.HWnd == Handle) {
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (5)
750SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 756UnsafeNativeMethods.SetScrollPos(new HandleRef(this, Handle), NativeMethods.SB_HORZ, position.X, true); 757UnsafeNativeMethods.SetScrollPos(new HandleRef(this, Handle), NativeMethods.SB_VERT, position.Y, true); 769UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_VERT, info, true); 775UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ, info, true);
winforms\Managed\System\WinForms\ProgressBar.cs (6)
453UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 462UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 788UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 789UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 893UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 894UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
winforms\Managed\System\WinForms\PropertyGrid.cs (3)
3840IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 4665UnsafeNativeMethods.MapWindowPoints(new HandleRef(child, child.Handle), new HandleRef(this, Handle), temp, 1);
winforms\Managed\System\WinForms\PropertyGridInternal\DropDownButton.cs (1)
241UseStdAccessibleObjects(owningDropDownButton.Handle);
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (1)
2843runtimeId[1] = (int)(long)owner.GridEntryHost.Handle;
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (8)
89UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i])); 133toolInfos[index].hwnd = c.Handle; 134toolInfos[index].uId = c.Handle; 160UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO((Control)sender)); 204SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST, 209if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(c))) { 216UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 230if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i]))) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (27)
420int exStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(edit, edit.Handle), NativeMethods.GWL_EXSTYLE))); 791UnsafeNativeMethods.ClientToScreen(new HandleRef(this, Handle), pt); 998gotfocus = IntPtr.Zero != UnsafeNativeMethods.SetFocus(new HandleRef(this, Handle)); 1543return Handle; 1663SafeNativeMethods.SetWindowPos(new HandleRef(this.dropDownHolder, this.dropDownHolder.Handle), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags); 1691UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(this, Handle)); 1706SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA); 1735UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(this, Handle)); 1737SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA); 2766if (hwnd == dropDownHolder.Handle) { 3280if (UnsafeNativeMethods.IsChild(new HandleRef(null, foregroundWindow), new HandleRef(null, this.Handle))) { 3870IntPtr hdc = UnsafeNativeMethods.GetDC(new HandleRef(DropDownListBox, DropDownListBox.Handle)); 3899UnsafeNativeMethods.ReleaseDC(new HandleRef(DropDownListBox, DropDownListBox.Handle), new HandleRef(DropDownListBox, hdc)); 5270if (nmhdr->hwndFrom == ToolTip.Handle) { 5346UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_STARTCOMPOSITION, 0, 0); 5351UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_COMPOSITION, m.WParam, m.LParam); 5503cp.Parent = gridView.ParentInternal.Handle; 5687if (hWnd == this.Handle) { 6214UseStdAccessibleObjects(_owningGridViewListBox.Handle); 6385runtimeId[1] = (int)(long)_owningGridViewListBox.Handle; 6650UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CHAR, (IntPtr)keyChar, IntPtr.Zero); 6850if (nmhdr->hwndFrom == psheet.ToolTip.Handle) { 7149SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(control, control.Handle), out thisProcessID); 7229IntPtr handle = control.Handle; 7740UnsafeNativeMethods.ScreenToClient(new HandleRef(Owner, Owner.Handle), pt);
winforms\Managed\System\WinForms\RadioButton.cs (1)
574if (UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle) {
winforms\Managed\System\WinForms\RichTextBox.cs (46)
526if (SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)) > 0) { 597opt = (RichTextBoxLanguageOptions)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETLANGOPTIONS, 0, 0); 610UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETLANGOPTIONS, 0, (int) value); 832UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 879UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 903UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 933UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 981UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 1016UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 1067UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf2); 1114UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1130UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1155UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1171UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1284UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1302UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1324UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1346UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1354UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1518return unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTLENGTHEX, gtl, 0 /*ignored*/)); 2027position = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_FINDTEXT, findOptions, ft); 2065UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_EXSETSEL, 0, chrg); 2113int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 2170len = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg); 2247UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf); 2253UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf2); 2324int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, wpt); 2378UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_POSFROMCHAR, pt, index); 2604UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETOPTIONS, (IntPtr)RichTextBoxConstants.ECOOP_OR, 2720UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_PASTESPECIAL, clipFormat.Id, rps); 2873return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 2879return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, charRange, cf); 2912UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfA); 2926UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfW); 3017UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_EXSETSEL, 0, cr); 3068UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMIN, flags, es64); 3074UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMIN, flags, es); 3165UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMOUT, flags, es64); 3171UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMOUT, flags, es); 3282UnsafeNativeMethods.SendCallbackMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETOLECALLBACK, IntPtr.Zero, pRichEditOleCallback); 3291UnsafeNativeMethods.DragAcceptFiles(new HandleRef(this, Handle), false); 3383int len = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg); 3408if (m.LParam == Handle && !GetState(STATE_CREATINGHANDLE)) 3435if (m.HWnd == Handle) { 3622int textLength = SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 3627UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.EM_SETSEL, selEnd - 1, selEnd);
winforms\Managed\System\WinForms\Screen.cs (1)
345return FromHandleInternal(control.Handle);
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
878SafeNativeMethods.ScrollWindowEx(new HandleRef(this, Handle), xDelta, yDelta, 991SafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), fnBar, si);
winforms\Managed\System\WinForms\ScrollBar.cs (3)
810UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si, true); 895SafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si); 928if (UnsafeNativeMethods.GetFocus() == this.Handle) {
winforms\Managed\System\WinForms\ScrollProperties.cs (3)
321UnsafeNativeMethods.SetScrollInfo(new HandleRef(parent, parent.Handle), Orientation, si, true); 333UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_ENABLE_BOTH); 336UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_DISABLE_BOTH);
winforms\Managed\System\WinForms\SendKeys.cs (1)
891ParseKeys(keys, (control != null) ? control.Handle : IntPtr.Zero);
winforms\Managed\System\WinForms\SplitContainer.cs (4)
589UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 590if ((r.left <= p.x && p.x < r.right && r.top <= p.y && p.y < r.bottom) || UnsafeNativeMethods.GetCapture() == Handle) 591SendMessage(NativeMethods.WM_SETCURSOR, Handle, NativeMethods.HTCLIENT); 1635IntPtr parentHandle = this.Handle;
winforms\Managed\System\WinForms\Splitter.cs (1)
772IntPtr parentHandle = ParentInternal.Handle;
winforms\Managed\System\WinForms\StatusBar.cs (6)
104elementSize = vsRenderer.GetPartSize(Graphics.FromHwndInternal(this.Handle), ThemeSizeType.True); 110elementSize = vsRenderer.GetPartSize(Graphics.FromHwndInternal(this.Handle), ThemeSizeType.True); 602UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.SB_SETPARTS, 1, offsets); 616UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.SB_SETPARTS, length, offsets2); 1856ti.hwnd = parent.Handle; 1862ti.uId = parent.Handle;
winforms\Managed\System\WinForms\StatusBarPanel.cs (2)
643int result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_SETTEXT, (IntPtr)wparam, sendText); 657result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_GETRECT, (IntPtr)GetIndex(), ref rect);
winforms\Managed\System\WinForms\StatusStrip.cs (1)
581UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, this.Handle), rootHwnd, gripLocation, 1);
winforms\Managed\System\WinForms\TabControl.cs (9)
1066int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, tabPageCount + 1, tcitem); 1067UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), tabBaseReLayoutMessage, IntPtr.Zero, IntPtr.Zero); 1309retIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, index, tcitem); 1341NativeWindow.AddWindowToIDTable(this, this.Handle); 1407NativeWindow.RemoveWindowFromIDTable(this.Handle); 1738UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TCM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1751UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETITEM, index, tcitem); 1754UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETCURSEL, (IntPtr)index, IntPtr.Zero); 2135IntPtr hwnd = Handle;
winforms\Managed\System\WinForms\TextBox.cs (4)
608SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 786if (!stringSource.Bind(new HandleRef(this, Handle), (int)AutoCompleteMode)) 813int ret = SafeNativeMethods.SHAutoComplete(new HandleRef(this, Handle) , (int)AutoCompleteSource | mode); 835SafeNativeMethods.SHAutoComplete(new HandleRef(this, Handle) , mode);
winforms\Managed\System\WinForms\TextBoxBase.cs (7)
1013UnsafeNativeMethods.SendMessage( new HandleRef( this, Handle ), NativeMethods.EM_GETSEL, ref start, ref end ); 1258return SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 1318UnsafeNativeMethods.SetWindowText(new HandleRef(this, Handle), value); 1687if (!ValidationCancelled && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle) { 1756int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, longPoint); 1795int i = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_POSFROMCHAR, index, 0); 1836if (UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETOLEINTERFACE, 0, out editOle) != 0) {
winforms\Managed\System\WinForms\ToolBar.cs (6)
1149UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_SETBUTTONINFO, x, ref tbbi); 1200UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_INSERTBUTTON, index, ref tbbutton); 1237UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_SETBUTTONINFO, index, ref tbbi); 1494UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TB_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1569new HandleRef(this, Handle), tpm); 1733UnsafeNativeMethods.ClientToScreen(new HandleRef(this, this.Handle), leftTop);
winforms\Managed\System\WinForms\ToolBarButton.cs (2)
335UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.TB_GETRECT, FindButtonIndex(), ref rc); 559int buttonID = (int)UnsafeNativeMethods.SendMessage(new HandleRef(Parent, Parent.Handle), NativeMethods.TB_GETBUTTONINFO, commandId, ref button);
winforms\Managed\System\WinForms\ToolStrip.cs (7)
2843UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)imageHdc, 4113if ((hwndThatLostFocus != IntPtr.Zero) && (hwndThatLostFocus != this.Handle)) { 4513if (Focused && (otherHwnd != this.Handle)) { 4530HandleRef thisHandle = new HandleRef(this, this.Handle); 4720IntPtr hwndClicked = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, Handle), pt.X, pt.Y,(int)(GetChildAtPointSkip.Invisible | GetChildAtPointSkip.Disabled | GetChildAtPointSkip.Transparent)); 4723if (hwndClicked == this.Handle) { 5165if (!UnsafeNativeMethods.IsChild(new HandleRef(this, ownerToolStrip.Handle), new HandleRef(this,m.HWnd))) {
winforms\Managed\System\WinForms\ToolStripComboBox.cs (1)
775childAccessibleObject = new ChildAccessibleObject(toolStripComboBoxControl, toolStripComboBoxControl.Handle);
winforms\Managed\System\WinForms\ToolStripDropDown.cs (6)
1103SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), topMostFlag, 0, 0, 0, 0, 1672UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ToolStripManager.ModalMenuFilter.ActiveHwnd); 1680UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHandle); 1841else if (IsHandleCreated && SafeNativeMethods.IsWindowEnabled(new HandleRef(this, Handle))) { 1842SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, 2022result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA);
winforms\Managed\System\WinForms\ToolStripDropTargetManager.cs (4)
258Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Registering as drop target: " + owner.Handle.ToString()); 260int n = UnsafeNativeMethods.RegisterDragDrop(new HandleRef(owner, owner.Handle), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this))); 273Debug.WriteLineIf(CompModSwitches.DragDrop.TraceInfo, "Revoking drop target: " + owner.Handle.ToString()); 276int n = UnsafeNativeMethods.RevokeDragDrop(new HandleRef(owner, owner.Handle));
winforms\Managed\System\WinForms\ToolStripManager.cs (8)
979ActiveHwndInternal = new HandleRef(this, topLevel.Handle); 1050UnsafeNativeMethods.MapWindowPoints(new HandleRef(activeToolStrip, hwndMouseMessageIsFrom), new HandleRef(activeToolStrip, activeToolStrip.Handle), pt, 1); 1056&& activeToolStripDropDown.OwnerToolStrip.Handle == hwndMouseMessageIsFrom 1167Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ModalMenuFilter.SetActiveToolStripCore] Setting " + WindowsFormsUtils.GetControlInformation(toolStrip.Handle) + " active."); 1246HandleRef hwndActiveToolStrip = new HandleRef(activeToolStrip, activeToolStrip.Handle); 1292&& (IsChildOrSameWindow(new HandleRef(toplevelToolStrip, toplevelToolStrip.Handle), 1352m.HWnd = activeToolStrip.Handle; 1709IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(toplevelControl, toplevelControl.Handle));
winforms\Managed\System\WinForms\ToolStripTextBox.cs (3)
648UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), ref rect); 735SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 887UnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.Handle),hdc);
winforms\Managed\System\WinForms\ToolTip.cs (8)
243cp.Parent = TopLevelControl.Handle; 1136return this.GetMinToolInfoForHandle(ctl.Handle); 1274baseHwnd = baseVar.Handle; 1298hwnd = baseVar.Handle; 1303baseHwnd = baseVar.Handle; 1557UnsafeNativeMethods.GetWindowRect(new HandleRef(associatedControl, associatedControl.Handle), ref r); 2016ti.hwnd = tool.Handle; 2017ti.uId = tool.Handle;
winforms\Managed\System\WinForms\TreeNode.cs (22)
284if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) == 0) { 307if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 0, ref rc) == 0) { 345UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 637bool visible = ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) != 0); 712IntPtr next = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), 840IntPtr prev = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), 920UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEM, 0, ref item); 1208UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, 0, handle); 1382UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_COLLAPSE, Handle); 1493UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, cancel?1:0, 0); 1554UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENSUREVISIBLE, 0, Handle); 1570UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_EXPAND, Handle); 1711IntPtr editHandle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETEDITCONTROL, 0, 0); 1716UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, 0 /* fCancel==FALSE */, 0); 1719handle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_INSERTITEM, 0, ref tvis); 1728UnsafeNativeMethods.PostMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, IntPtr.Zero, handle); 1731SafeNativeMethods.InvalidateRect(new HandleRef(tv, tv.Handle), null, false); 1739UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.WM_SETREDRAW, 1, 0); 1806UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_DELETEITEM, 0, handle); 1832UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 1944UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 1964UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item);
winforms\Managed\System\WinForms\TreeView.cs (27)
358int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1750UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_SETREDRAW, (IntPtr)1, IntPtr.Zero); 1765UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1787IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1837IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1992int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1994UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 1998int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 2000UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 2045SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, Int32.MaxValue, this.Height, flags); 2051SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, oldSize, this.Height, flags); 2167IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2580if (unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc)) != 0) 2581SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), ref rc, true); 2732if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ,si) != false) { 2908IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2943IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3022IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3048SendMessage(NativeMethods.WM_CONTEXTMENU, Handle, SafeNativeMethods.GetMessagePos()); 3095UnsafeNativeMethods.SetForegroundWindow(new HandleRef(this, this.Handle)); 3103new HandleRef(this, this.Handle), 3107UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 3113UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_DROPHILITE, treeNode.Handle); 3194UnsafeNativeMethods.SendMessage(new HandleRef(null, this.Handle), NativeMethods.TVM_GETITEM, 0, ref item1); 3259hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3287IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 3357hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhit);
winforms\Managed\System\WinForms\TrustManagerPromptUI.cs (1)
781X509Certificate2UI.DisplayCertificate(m_certificate, this.Handle);
winforms\Managed\System\WinForms\UpDownBase.cs (6)
966if (UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle && !ValidationCancelled) { 1165UnsafeNativeMethods.MapWindowPoints(new HandleRef(child, child.Handle), new HandleRef(this, Handle), point, 1); 1225UnsafeNativeMethods.SetFocus(new HandleRef(TextBox, TextBox.Handle)); 1311if (!parent.ValidationCancelled && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle) { 1657if (!parent.ValidationCancelled && UnsafeNativeMethods.WindowFromPoint(pt.X, pt.Y) == Handle) {
winforms\Managed\System\WinForms\UserControl.cs (1)
295IntPtr hwnd = Handle;
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (2)
449if (childControl.Handle != IntPtr.Zero) { 452lastHResult = SafeNativeMethods.DrawThemeParentBackground( new HandleRef( this, childControl.Handle ), hdc, new NativeMethods.COMRECT( bounds ) );
winforms\Managed\System\WinForms\WebBrowser.cs (1)
1203&& SafeNativeMethods.IsChild(new HandleRef(this, this.Handle), new HandleRef(null, hwndFocus));
winforms\Managed\System\WinForms\WebBrowserBase.cs (4)
668return IsHandleCreated ? Handle : IntPtr.Zero; 744int hr = this.axOleObject.DoVerb(verb, IntPtr.Zero, this.ActiveXSite, 0, this.Handle, 837UnsafeNativeMethods.SetParent(new HandleRef(null, hwnd), new HandleRef(this, this.Handle)); 1227cc = Control.FromHandle(UnsafeNativeMethods.GetParent(new HandleRef(this, Handle))) as ContainerControl;
winforms\Managed\System\WinForms\WebBrowserContainer.cs (1)
73return parent.Handle;
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (2)
262return UnsafeNativeMethods.GetParent(new HandleRef(Host, Host.Handle)); 317lpFrameInfo.hwndFrame = (this.Host.ParentInternal == null) ? IntPtr.Zero : this.Host.ParentInternal.Handle;
winforms\Managed\System\WinForms\WinFormsUtils.cs (4)
238return GetControlInformation(control.Handle); 294return GetRootHWnd(new HandleRef(control, control.Handle)); 331UnsafeNativeMethods.MapWindowPoints(new HandleRef(fromControl, fromControl.Handle), new HandleRef(toControl, toControl.Handle), pt, 1);
System.Windows.Forms.DataVisualization (2)
WinForm\ChartWinControl.cs (2)
2145using (Graphics g = Graphics.FromHwndInternal(Handle)) 2160using (Graphics g = Graphics.FromHwndInternal(Handle))
System.Workflow.Activities (4)
Rules\Design\Dialogs\ConditionBrowserDialog.cs (2)
145NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero); 147NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
Rules\Design\Dialogs\RuleSetBrowserDialog.cs (2)
128NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero); 130NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
System.Workflow.ComponentModel (3)
AuthoringOM\Design\DesignerWidgets.cs (2)
2159this.infoTip = new NativeToolTip(this.parentControl.Handle); 2171this.inplaceTip = new NativeToolTip(this.parentControl.Handle);
AuthoringOM\Design\Dialogs\TypeBrowserDialog.cs (1)
993IntPtr headerWindow = NativeMethods.ListView_GetHeader(this.artifactListView.Handle);
WsatUI (3)
MMCUI\AcceptedCertificatesForm.cs (1)
94this.Handle);
MMCUI\WSATControl.cs (1)
344if (ACLWrapper.EditACLSecurity(new WsatSecurityModel(Utilities.LocalHostName, config), this.Handle))
MMCUI\WSATPropertySheet.cs (1)
276SafeNativeMethods.SetParent(wsatControl.Handle, this.windowUnmanagedParent);