162 writes to Y
System.Drawing.Common.Tests (2)
System\Drawing\Drawing2D\GraphicsPathTests.cs (2)
2257point.Y = 1; 2285point.Y = 15;
System.Drawing.Primitives (1)
System\Drawing\Point.cs (1)
156Y += dy;
System.Windows.Forms (94)
System\Resources\ResXResourceReader.cs (1)
329pt.Y = lineInfo.LineNumber;
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
290clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 291clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (3)
284s_logPixels.Y = PInvokeCore.GetDeviceCaps(dc, GET_DEVICE_CAPS_INDEX.LOGPIXELSY); 772Y = (LogPixels.Y * y + HiMetricPerInch / 2) / HiMetricPerInch 1351Y = (HiMetricPerInch * y + (LogPixels.Y >> 1)) / LogPixels.Y
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
363clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 364clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
2341Y = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 2348ptFirstDisplayedCellAddress.Y = DisplayedBandsInfo.FirstDisplayedScrollingRow;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (22)
12610_ptMouseEnteredCell.Y = e.RowIndex; 12633_ptMouseEnteredCell.Y = -2; 15558newCurrentCell.Y += insertionCount; 16116_ptMouseDownCell.Y = hti._row; 16166_ptMouseEnteredCell.X = _ptMouseEnteredCell.Y = -2; 17396_ptCurrentCellCache.Y = -1; 17407_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17415_ptCurrentCellCache.Y = -1; 18816pt.Y += Height; 25844_ptMouseDownCell.Y = -2; 26623_ptAnchorCell.Y = firstVisibleRowIndex; 26628_ptAnchorCell.Y = -1; 26789_ptCurrentCell.Y = rowIndex; 26923_ptCurrentCell.Y = rowIndex; 26933_ptAnchorCell.Y = rowIndex; 26995_ptAnchorCell.Y = rowIndex; 27083_ptCurrentCell.Y = -1; 27090_ptAnchorCell.Y = -1; 28221_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28352_ptCurrentCellCache.Y = rowIndex2; 28356_ptCurrentCellCache.Y = rowIndex1; 29201_ptMouseEnteredCell.X = _ptMouseEnteredCell.Y = -2;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
2156middle.Y += (dropRect.Height % 2); 2180middle.Y += (dropRect.Height % 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (9)
393ptTextLocation.Y = cellBounds.Y; 398ptTextLocation.Y = cellBounds.Y; 403ptTextLocation.Y = cellBounds.Y; 408ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2; 413ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2; 418ptTextLocation.Y = cellBounds.Y + (cellBounds.Height - sizeText.Height) / 2; 423ptTextLocation.Y = cellBounds.Bottom - sizeText.Height; 428ptTextLocation.Y = cellBounds.Bottom - sizeText.Height; 433ptTextLocation.Y = cellBounds.Bottom - sizeText.Height;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (4)
1451location.Y += rect.Y; 1454location.Y -= size.Height; 1459location.Y += rect.Height + 1; 1688pt.Y = (y - _location.Y) / (1 + RowHeight);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
128clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 129clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
377noMansLand.Y += ClientSize.Height + 1;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
4058newLocation.Y -= delta; 4514cursorLocation.Y += Cursor.Size.Height - currentCursor.HotSpot.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1026offset.Y = -dropDownBounds.Height; 1029offset.Y = -dropDownBounds.Height;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (4)
308offset.Y = -dropDownBounds.Height + 1; 311offset.Y = -dropDownBounds.Height + 1; 314offset.Y = Height - 1; 318offset.Y = Height - 1;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (3)
368nextPoint.Y = _imagePadding.Top; 420nextPoint.Y = _textPadding.Top; 425nextPoint.Y = _arrowPadding.Top;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3457toPoint.Y += currentToolStripItemLocation.Y; 3469fromPoint.Y += currentToolStripItemLocation.Y; 3484fromPoint.Y -= currentToolStripItemLocation.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (3)
922clientLocation.Y = row.Bounds.Y; 959cursorLoc.Y = Cursor.Position.Y; 963cursorLoc.Y += toolStripToDrag.GripRectangle.Height / 2;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackLayout.cs (2)
194_noMansLand.Y += ToolStrip.ClientSize.Height + 1; 340itemLocation.Y = bounds.Y;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserSite.cs (1)
49pt->Y = -1;
System\Windows\Forms\Form.cs (10)
922loc.Y -= screen.Y; 3936p.Y = (ownerRect.top + ownerRect.bottom - s.Height) / 2; 3939p.Y = screenRect.Y; 3943p.Y = screenRect.Y + screenRect.Height - s.Height; 3981p.Y = Math.Max(screenRect.Y, screenRect.Y + (screenRect.Height - Height) / 2); 6868mmi->ptMinTrackSize.Y = minTrack.Height; 6885mmi->ptMaxTrackSize.Y = int.MaxValue; 6900mmi->ptMaxTrackSize.Y = Math.Max(maxTrack.Height, minTrackWindowSize.Height); 6906mmi->ptMaxPosition.Y = maximizedBounds.Y; 6908mmi->ptMaxSize.Y = maximizedBounds.Height;
System\Windows\Forms\Layout\DefaultLayout.cs (1)
95location.Y -= newSize.Height - oldBounds.Height;
System\Windows\Forms\Layout\LayoutUtils.cs (1)
436(point.Y, point.X) = (point.X, point.Y);
System\Windows\Forms\MDI\MDIClient.cs (3)
254wp.ptMinPosition.Y -= yDelta; 259wp.ptMinPosition.Y = 0; 263wp.ptMinPosition.Y = -2;
System\Windows\Forms\Printing\PrintPreviewControl.cs (7)
620_position.Y = _vScrollBar.Value; 629offset.Y -= Position.Y; 644lastImageSize.Y = maxImageHeight * row; 931locPos.Y = pos; 965locPos.Y = pos; 1009locPos.Y = pos; 1029locPos.Y = pos;
System\Windows\Forms\ToolTip\ToolTip.cs (2)
1334p.Y = visibleRect.top + visibleRect.Height / 2; 1946moveToLocation.Y = screen.WorkingArea.Bottom - tipSize.Height;
System.Windows.Forms.Design (56)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (6)
349editorLocation.Y += editorBounds.Y; 352editorLocation.Y -= dropDownSize.Height + 1; 356editorLocation.Y += editorBounds.Height; 373editorLocation.Y += editorBounds.Y; 376editorLocation.Y -= dropDownSize.Height + 1; 380editorLocation.Y += editorBounds.Height;
System\Drawing\Design\ColorEditor.ColorPalette.cs (4)
291SetFocus(_focus with { Y = _focus.Y - 1 }); 294SetFocus(_focus with { Y = _focus.Y + 1 }); 446newFocus.Y = 0; 456newFocus.Y = CellsDown - 1;
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
156topRight.Y = newRect.Top; 160topRight.Y -= (GlyphImageOpened.Height - CONTROLOVERLAP_Y);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
716offset.Y = FindSmallestValidDistance(_horizontalSnapLines, _horizontalDistances, minRange, maxRange, directionOffset.Y); 723offset.Y *= -1;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
160offset.Y = _parentGridSize.Height - yDelta; 164offset.Y = -yDelta; 771newPosition.Y += _lastSnapOffset.Y; 785newPosition.Y += _lastSnapOffset.Y;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
276_parentLocation.Y -= control.Location.Y; 611mouseLoc.Y += _lastSnapOffset.Y;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (5)
145offset.Y = _lastRectangle.Top - mouseLoc.Y; 151offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 167offset.Y = _lastRectangle.Top - mouseLoc.Y; 173offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 216offset.Y = _lastRectangle.Top - mouseLoc.Y;
System\Windows\Forms\Design\CommandSet.cs (20)
1043loc.Y = primaryLocation.Y + primarySize.Height - size.Height; 1051loc.Y = primarySize.Height / 2 + primaryLocation.Y - size.Height / 2; 1084loc.Y = primaryLocation.Y; 1202loc.Y -= delta; 1206loc.Y += (gridSize.Height - delta); 1357loc.Y += deltaY; 1359loc.Y -= deltaY; 2433loc.Y = (loc.Y / grid.Height) * grid.Height; 2833curLoc.Y = lastLoc.Y + lastSize.Height; 2839curLoc.Y -= grid.Height * (n - primaryIndex); 2841curLoc.Y = primaryLoc.Y; 2845curLoc.Y += grid.Height * (primaryIndex - n); 2847curLoc.Y = primaryLoc.Y; 2854curLoc.Y += grid.Height * (n - primaryIndex); 2858curLoc.Y -= grid.Height * (primaryIndex - n); 2863curLoc.Y = lastLoc.Y + lastSize.Height + nEqualDelta; 3258min.Y = loc.Y; 3268max.Y = loc.Y + size.Height; 3293parentOffset.Y -= (max.Y - min.Y) / 2; 3386parentOffset.Y = 0;
System\Windows\Forms\Design\ComponentTray.cs (3)
1306_mouseDragEnd.Y = e.Y; 1820_whiteSpace.Y = _whiteSpace.Y * 2 + 3; 1860newLoc.Y += bounds.Height + _whiteSpace.Y;
System\Windows\Forms\Design\SelectionUIHandler.cs (2)
254adjustedLoc.Y = ctlBounds.lastRequestedY; 392adjustedLoc.Y = newBounds.Y;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (4)
472newControlPosition.Y = Table.RowCount - 1; 480newControlPosition.Y = 0; 1025position.Y = rows.Length; 1034position.Y = i;
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (2)
531Y = e.Y 574Y = e.Y
System.Windows.Forms.Tests (4)
System\Windows\Forms\DataObjectTests.cs (1)
2824Point point = new() { X = 1, Y = 1 };
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (1)
716position.Y--;
System\Windows\Forms\ToolStripDropDownTests.cs (1)
1934expected.Y = Math.Max(expected.Y, SystemInformation.WorkingArea.Y);
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (1)
387position.Y--;
System.Windows.Forms.UI.IntegrationTests (5)
DragDropTests.cs (2)
199Y = (startCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2) 204Y = (endCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2)
RichTextBoxTests.cs (3)
41pt.Y += 2; 101pt.Y += 2; 162pt.Y += 2;
1576 references to Y
System.ComponentModel.TypeConverter (2)
System\Drawing\PointConverter.cs (2)
71string? y = intConverter.ConvertToString(context, culture, pt.Y); 80return new InstanceDescriptor(ctor, new object[] { pt.X, pt.Y });
System.Drawing.Common.Tests (11)
mono\System.Drawing\GraphicsTests.cs (1)
2953Assert.Equal(i, pts[i].Y);
System\Drawing\RegionTests.cs (10)
1396Assert.Equal(expected, region.IsVisible(point.X, point.Y)); 1397Assert.Equal(expected, region.IsVisible(point.X, point.Y, s_graphic)); 1398Assert.Equal(expected, region.IsVisible(point.X, point.Y, disposedGraphics)); 1399Assert.Equal(expected, region.IsVisible(point.X, point.Y, null)); 1401Assert.Equal(expected, region.IsVisible(point.X, point.Y, s_graphic)); 1402Assert.Equal(expected, region.IsVisible(point.X, point.Y, disposedGraphics)); 1403Assert.Equal(expected, region.IsVisible(point.X, point.Y, null)); 1404Assert.Equal(expected, region.IsVisible((float)point.X, point.Y, s_graphic)); 1405Assert.Equal(expected, region.IsVisible((float)point.X, point.Y, disposedGraphics)); 1406Assert.Equal(expected, region.IsVisible((float)point.X, point.Y, null));
System.Drawing.Primitives (16)
System\Drawing\Point.cs (11)
79public static implicit operator PointF(Point p) => new PointF(p.X, p.Y); 84public static explicit operator Size(Point p) => new Size(p.X, p.Y); 98/// <see cref='System.Drawing.Point.X'/> and <see cref='System.Drawing.Point.Y'/> properties of the two 101public static bool operator ==(Point left, Point right) => left.X == right.X && left.Y == right.Y; 105/// <see cref='System.Drawing.Point.X'/> or <see cref='System.Drawing.Point.Y'/> properties of the two 113public static Point Add(Point pt, Size sz) => new Point(unchecked(pt.X + sz.Width), unchecked(pt.Y + sz.Height)); 118public static Point Subtract(Point pt, Size sz) => new Point(unchecked(pt.X - sz.Width), unchecked(pt.Y - sz.Height)); 146public override readonly int GetHashCode() => HashCode.Combine(X, Y); 163public void Offset(Point p) => Offset(p.X, p.Y); 168public override readonly string ToString() => $"{{X={X},Y={Y}}}";
System\Drawing\Rectangle.cs (4)
42y = location.Y; 64Y = value.Y; 229public readonly bool Contains(Point pt) => Contains(pt.X, pt.Y); 326public void Offset(Point pos) => Offset(pos.X, pos.Y);
System\Drawing\Size.cs (1)
32height = pt.Y;
System.Private.Windows.Core (2)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
147value.Y).Write(writer);
Windows\Win32\Foundation\LPARAM.cs (1)
28public static explicit operator LPARAM(Point value) => MAKELPARAM(value.X, value.Y);
System.Windows.Forms (955)
System\Resources\ResXDataNode.cs (4)
375string newMessage = string.Format(SR.NotSupported, typeName, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X, nse.Message); 376XmlException xml = new(newMessage, nse, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X); 387dataNodeInfo.ReaderPosition.Y, 392new XmlException(newMessage, null, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X));
System\Resources\ResXResourceReader.cs (5)
376string newMessage = string.Format(SR.SerializationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, se.Message); 377XmlException xml = new(newMessage, se, pt.Y, pt.X); 383string newMessage = string.Format(SR.InvocationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, tie.InnerException?.Message); 384XmlException xml = new(newMessage, tie.InnerException, pt.Y, pt.X); 400XmlException xmlEx = new(e.Message, e, pt.Y, pt.X);
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
290clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 291clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\ActiveX\AxHost.cs (3)
1097sz.Height = phm.Y; 3259Bounds = new Rectangle(location.X, location.Y, ocxExtent.Width, ocxExtent.Height); 3266Bounds = new Rectangle(location.X, location.Y, newSize.Width, newSize.Height);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (8)
466PInvoke.SetViewportOrgEx(hdcDraw, p1.X, p1.Y, &pVp); 467PInvoke.SetViewportExtEx(hdcDraw, p2.X, p2.Y, (SIZE*)&sViewportExt); 488PInvoke.SetWindowOrgEx(hdcDraw, pW.X, pW.Y, lppt: null); 490PInvoke.SetViewportOrgEx(hdcDraw, pVp.X, pVp.Y, lppt: null); 702pSizel->Height = pt.Y; 772Y = (LogPixels.Y * y + HiMetricPerInch / 2) / HiMetricPerInch 1351Y = (HiMetricPerInch * y + (LogPixels.Y >> 1)) / LogPixels.Y
System\Windows\Forms\Control.cs (7)
1590if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 2516set => SetBounds(value.X, value.Y, _width, _height, BoundsSpecified.Location); 8011cliprect.Offset(-offs.X, -offs.Y); 8810viewportOrg.Y, 8812viewportOrg.Y + Height); 8838clientOffset = new(clientOffset.X - windowRect.left, clientOffset.Y - windowRect.top);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
401imageBounds.Y = imageStart.Y + 1;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
363clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 364clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (8)
1610OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptlc.X, Ptlc.Y, 0)); 1627OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, Ptmc.X, Ptmc.Y, 0)); 1644OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Ptrc.X, Ptrc.Y, 0)); 1658OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptl.X, Ptl.Y, 0)); 1703OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, P.X, P.Y, 0)); 1720OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Pt.X, Pt.Y, 0)); 1740OnMouseUp(new MouseEventArgs(MouseButtons.Right, 1, ptRBtnUp.X, ptRBtnUp.Y, 0)); 1762OnMouseMove(new MouseEventArgs(MouseButtons, 0, point.X, point.Y, 0));
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (3)
164new(middle.X - s_offsetPixels, middle.Y - 1), 165new(middle.X + s_offsetPixels + 1, middle.Y - 1), 166new(middle.X, middle.Y + s_offsetPixels)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (1)
161HitTestInfo hti = owner.HitTest(pt.X, pt.Y);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (28)
1136if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y)) 1708if (_ptCurrentCell.X == -1 && _ptCurrentCell.Y == -1) 1713Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.Y >= 0); 1715Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1716DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; // un-sharing row 1721if ((value is not null && (value.RowIndex != _ptCurrentCell.Y || value.ColumnIndex != _ptCurrentCell.X)) 1783Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 1784DataGridViewRow dataGridViewRow = Rows.SharedRow(_ptCurrentCell.Y); 1787Debug.Assert(IsSharedCellVisible(dataGridViewCell, _ptCurrentCell.Y)); 1801Debug.Assert(_ptCurrentCell.Y != -1); 1804bool previousVisibleRowExists = (Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1819Debug.Assert(_ptCurrentCell.Y != -1); 1822bool nextVisibleRowExists = (Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1837Debug.Assert(_ptCurrentCell.Y != -1); 1855Debug.Assert(_ptCurrentCell.Y >= 0); 1856Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1858return Rows[_ptCurrentCell.Y]; 2289return Rows[firstDisplayedCellAddress.Y].Cells[firstDisplayedCellAddress.X]; // un-shares the row of first displayed cell 2343if (ptFirstDisplayedCellAddress.Y == -1) 2360if (ptFirstDisplayedCellAddress.Y >= 0) 2850=> _ptCurrentCell.X == -1 ? null : CurrentCellInternal.GetInheritedStyleInternal(_ptCurrentCell.Y); 2901if (RowHeadersVisible && ShowEditingIcon && _ptCurrentCell.Y >= 0) 2904InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3895Debug.Assert(_ptCurrentCell.Y >= 0); 3896InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3903Debug.Assert(_ptCurrentCell.Y >= 0); 3904InvalidateCellPrivate(-1, _ptCurrentCell.Y);
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (4)
652if (_owner.CurrentCellAddress.Y == e.NewIndex && _owner.IsCurrentCellInEditMode) 720_owner.CurrentCellAddress.Y != _owner.NewRowIndex && // condition 5. 770if (_owner.CurrentCellAddress.Y != _owner.NewRowIndex || _owner.IsCurrentRowDirty) 1261if (rowIndex == _owner.CurrentCellAddress.Y && columnIndex == _owner.CurrentCellAddress.X)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (541)
27if (cellAddress.Y < 0 || cellAddress.Y >= Rows.Count) 32int visibleRowIndex = Rows.GetRowCount(DataGridViewElementStates.Visible, 0, cellAddress.Y); 2579Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 2585if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2601DataGridViewCellCancelEventArgs dgvcce = new(_ptCurrentCell.X, _ptCurrentCell.Y); 2618if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2640DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 2682((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = _ptCurrentCell.Y; 2719InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3040Debug.Assert(_ptCurrentCell.Y != -1); 3101_ptCurrentCell.Y, 3126InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3205if (currentCellDirty || _ptCurrentCell.Y == -1 || _ptCurrentCell.X == -1) 3233if (_ptCurrentCell.Y > -1) 3235InvalidateRowPrivate(_ptCurrentCell.Y); 3239DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 3256if (discardNewRow && _ptCurrentCell.Y == NewRowIndex - 1) 3264if (!IsCurrentRowDirty && _ptCurrentCell.Y == NewRowIndex - 1 && _dataGridViewState1[State1_NewRowCreatedByEditing]) 3350if ((DataConnection.CurrencyManager?.Count ?? 0) <= _ptCurrentCell.Y) 3765OnCellLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3775OnRowLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3786if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 3788InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 3801if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3813_ptCurrentCell.Y, 3825OnCellEnter(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3836_ptCurrentCell.Y, 3851OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3878if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3888_ptCurrentCell.Y, 3920_ptCurrentCell.Y, 3959OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 4026int rowIndex = _ptCurrentCell.Y; 4070fireRowLeave: _ptCurrentCell.Y != rowIndex, 4071fireRowEnter: _ptCurrentCell.Y != rowIndex, 4080if (_ptCurrentCell.Y != rowIndex && _ptCurrentCell.Y != -1) 4084int rowIndexTmp = _ptCurrentCell.Y; 4135forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 5474Debug.Assert(_ptCurrentCell.Y == NewRowIndex); 5736int adjustedY = _editingPanel.Location.Y + e.Y; 5740adjustedY += EditingControl.Location.Y; 6167int curRowIndex = _ptCurrentCell.Y; 6212if (curRowIndex != _ptCurrentCell.Y || curColIndex != _ptCurrentCell.X) 6236InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 6263InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 8594if (_ptAnchorCell.Y != -1 8595&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) != 0 8632if (_ptAnchorCell.Y != -1 8633&& ((Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0 8814if (((_ptAnchorCell.Y != -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0) 8815|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 9630HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 9631int mouseX = ptMouse.X, mouseY = ptMouse.Y; 9653ptMouse.Y - yOffset - (yOffset / Math.Abs(yOffset))) 9683_uneditedFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9694dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9705_ptCurrentCell.Y, 9724object? initialFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9729dataGridViewCell.InitializeEditingControl(_ptCurrentCell.Y, initialFormattedValue, dataGridViewCellStyle); 9737_ptCurrentCell.Y, 10388&& (includeNewRow || !AllowUserToAddRowsInternal || firstDisplayedCellAddress.Y != Rows.Count - 1)) 10392firstDisplayedCellAddress.Y, 11899HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 11907Debug.Assert(_ptMouseDownCell.Y == hti._row); 11971BeginRowResize(ptGridCoord.Y, hti._mouseBarOffset, rowIndex); 12040BeginColumnHeadersResize(ptGridCoord.Y, hti._mouseBarOffset); 12065if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row)) 12070forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row, 12071forCurrentRowChange: _ptCurrentCell.Y != hti._row)) 12153int oldEdgeRowIndex = _ptCurrentCell.Y; 12163_ptAnchorCell.Y, 12343int oldEdgeRowIndex = _ptCurrentCell.Y; 12353_ptAnchorCell.Y, 12407&& _ptAnchorCell.Y > -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 12454if (hti._row >= _ptAnchorCell.Y) 12456SelectRowRange(_ptAnchorCell.Y, hti._row, true); 12460SelectRowRange(hti._row, _ptAnchorCell.Y, true); 12549int oldEdgeRowIndex = _ptCurrentCell.Y; 12559_ptAnchorCell.Y, 12676&& _ptMouseDownCell.Y == -1 12682HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 12698|| Math.Abs(_ptMouseDownGridCoord.Y - ptGridCoord.Y) >= s_dragSize.Height) 12763int oldEdgeRowIndex = _ptCurrentCell.Y; 12764if ((hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12783_ptAnchorCell.Y, 12787if (hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12822&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 13701int oldCurrentCellY = _ptCurrentCell.Y; 13707fireRowLeave: rowIndex != _ptCurrentCell.Y, 13708fireRowEnter: rowIndex != _ptCurrentCell.Y, 13866_ptCurrentCell.Y, 14126if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X && !CommitEditForOperation(hti._col, _ptCurrentCell.Y, true)) 14210if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(hti._col)) 14217_ptCurrentCell.Y, 14443&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14544&& _ptMouseDownCell.Y == rowIndex 14546|| _ptMouseDownCell.Y == -1 14547|| (columnIndex == _ptCurrentCell.X && rowIndex == _ptCurrentCell.Y)))) 14578InvalidateCellPrivate(-1, _ptCurrentCell.Y); 14581if (IsCurrentCellDirty && NewRowIndex == _ptCurrentCell.Y) 14783if (elementState == DataGridViewElementStates.Visible && _ptCurrentCell.Y == rowIndex) 14791Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y); 14805if (_ptCurrentCell.Y == rowIndex 14844&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 15022_ptCurrentCell.Y, 15030OnCellEnter(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15055InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15064InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15189InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15235ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 15274newCurrentCell.Y, 15307if (lastInsertion && newCurrentCell.Y != -1) 15312newCurrentCell.Y, 15347if (newCurrentCell.Y != -1) 15352newCurrentCell.Y, 15411_ptCurrentCell.Y); 15528if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15530newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 15556if (newCurrentCell.Y != -1) 15611if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15613newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 15680if (dataGridViewCell.KeyDownUnsharesRowInternal(e, _ptCurrentCell.Y)) 15683_ = Rows[_ptCurrentCell.Y]; 15684CurrentCellInternal.OnKeyDownInternal(e, _ptCurrentCell.Y); 15688dataGridViewCell.OnKeyDownInternal(e, _ptCurrentCell.Y); 15739if (dataGridViewCell.KeyPressUnsharesRowInternal(e, _ptCurrentCell.Y)) 15742_ = Rows[_ptCurrentCell.Y]; 15743CurrentCellInternal.OnKeyPressInternal(e, _ptCurrentCell.Y); 15747dataGridViewCell.OnKeyPressInternal(e, _ptCurrentCell.Y); 15773if (dataGridViewCell.KeyUpUnsharesRowInternal(e, _ptCurrentCell.Y)) 15776_ = Rows[_ptCurrentCell.Y]; 15777CurrentCellInternal.OnKeyUpInternal(e, _ptCurrentCell.Y); 15781dataGridViewCell.OnKeyUpInternal(e, _ptCurrentCell.Y); 15815OnCellLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15821OnRowLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15829if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 15831InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15847InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15871&& _ptMouseDownCell.Y == hti._row 15874|| _ptMouseDownCell.Y == -1 15875|| (_ptMouseDownCell.X == _ptCurrentCell.X && _ptMouseDownCell.Y == _ptCurrentCell.Y))) 15959if (_ptMouseDownCell.X == hti._col && _ptMouseDownCell.Y == hti._row) 16105Debug.Assert(_ptMouseDownCell.Y != -2); 16160&& _ptMouseEnteredCell.Y >= -1 && _ptMouseEnteredCell.Y < Rows.Count) 16162OnCellMouseLeave(new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y)); 16372&& _ptMouseDownCell.Y == hti._row 16861&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 16899newCurrentCell.Y, 16945if (newCurrentCell.Y != -1) 16950newCurrentCell.Y, 17064newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17251if (_ptCurrentCell.Y != -1 && rowIndexDeleted <= _ptCurrentCell.Y) 17254if (rowIndexDeleted == _ptCurrentCell.Y) 17275Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y); 17276newY = _ptCurrentCell.Y - 1; 17280if (rowIndexDeleted == _ptCurrentCell.Y) 17390if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 17392SetCurrentCellAddressCore(_ptCurrentCellCache.X, _ptCurrentCellCache.Y, false, false, false); 17402if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17407_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17948if (dataGridViewColumn is not null && hti._row != _ptCurrentCell.Y) 17951int oldCurrentCellY = _ptCurrentCell.Y; 17958fireRowLeave: hti._row != _ptCurrentCell.Y, 17959fireRowEnter: hti._row != _ptCurrentCell.Y, 18047&& _ptAnchorCell.Y > -1 18048&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 18104if (hti._row >= _ptAnchorCell.Y) 18106SelectRowRange(_ptAnchorCell.Y, hti._row, true); 18110SelectRowRange(hti._row, _ptAnchorCell.Y, true); 18122if (hti._row != _ptCurrentCell.Y) 18140else if (_ptCurrentCell.Y != -1) 18145_ptCurrentCell.Y, 18402if (_ptCurrentCell.Y != -1 18403&& hti._row != _ptCurrentCell.Y 18481if (_ptCurrentCell.Y != -1 && hti._row != _ptCurrentCell.Y) 18678if (e.StateChanged == DataGridViewElementStates.ReadOnly && rowIndex == _ptCurrentCell.Y && !_dataGridViewOper[OperationInReadOnlyChange]) 18698if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 18827if (pt.Y < 0 && step < 0) 18829Invalidate(new Rectangle(new Point(0, -pt.Y), 18834if (pt.Y > rect.Bottom && step > 0) 18837new Size(ClientSize.Width, ClientSize.Height - (pt.Y - rect.Bottom) - step))); 18984_ptCurrentCell.Y, 19065if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19077OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19080if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19083int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19801Debug.Assert(dataGridViewCell.RowIndex == _ptCurrentCell.Y || dataGridViewCell.RowIndex == -1); 19820Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19821Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19835if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19861bool isFirstDisplayedRow = FirstDisplayedRowIndex == _ptCurrentCell.Y; 20157if (_ptCurrentCell.Y != -1) 20159nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20206Debug.Assert(_ptAnchorCell.Y >= 0); 20208int oldEdgeRowIndex = _ptCurrentCell.Y; 20219_ptAnchorCell.Y, 20338int oldEdgeRowIndex = _ptCurrentCell.Y; 20349_ptAnchorCell.Y, 20455if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20462Debug.Assert(_ptAnchorCell.Y >= 0); 20463SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 20483SetSelectedRowCore(_ptCurrentCell.Y, false); 20586if (nextVisibleRowIndex >= _ptAnchorCell.Y) 20588SelectRowRange(_ptAnchorCell.Y, nextVisibleRowIndex, true); 20592SelectRowRange(nextVisibleRowIndex, _ptAnchorCell.Y, true); 20691Debug.Assert(_ptAnchorCell.Y >= 0); 20692if (_ptAnchorCell.Y == -1 || _ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20698if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20701SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 20706int oldEdgeRowIndex = _ptCurrentCell.Y; 20711_ptAnchorCell.Y, 20729if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20735if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20737SetSelectedRowCore(_ptCurrentCell.Y, false); 20742SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 20781if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20787if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20841if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20847if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20852if (_ptAnchorCell.Y == -1) 20858if (nextVisibleRowIndex >= _ptAnchorCell.Y) 20860SelectRowRange(_ptAnchorCell.Y, nextVisibleRowIndex, true); 20864SelectRowRange(nextVisibleRowIndex, _ptAnchorCell.Y, true); 20877int oldEdgeRowIndex = _ptCurrentCell.Y; 20888_ptAnchorCell.Y, 20939if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20945if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21106int oldEdgeRowIndex = _ptCurrentCell.Y; 21111_ptAnchorCell.Y, 21154if (_ptCurrentCell.Y > -1 21155&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21158SelectRowRange(_ptCurrentCell.Y, lastVisibleRowIndex, select: true); 21163int oldEdgeRowIndex = _ptCurrentCell.Y; 21168_ptAnchorCell.Y, 21175if (_ptCurrentCell.Y > -1 21176&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21192if (_ptCurrentCell.Y > -1 21193&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21289int oldEdgeRowIndex = _ptCurrentCell.Y; 21299_ptAnchorCell.Y, 21361if (MultiSelect && _ptCurrentCell.Y >= 0) 21363if (_ptAnchorCell.Y == -1) 21368SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 21456int rowIndex = _ptCurrentCell.Y; 21500Debug.Assert(_ptCurrentCell.Y != -1); 21503|| IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21507&& !IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21510bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21580int oldEdgeRowIndex = _ptCurrentCell.Y; 21585_ptAnchorCell.Y, 21628if (_ptCurrentCell.Y > -1 21629&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21632SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, select: true); 21637int oldEdgeRowIndex = _ptCurrentCell.Y; 21642_ptAnchorCell.Y, 21649if (_ptCurrentCell.Y > -1 21650&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21666if (_ptCurrentCell.Y > -1 21667&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21768int oldEdgeRowIndex = _ptCurrentCell.Y; 21778_ptAnchorCell.Y, 21882&& !IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 21899bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22038if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22127if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22132if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22141int oldEdgeRowIndex = _ptCurrentCell.Y; 22151_ptAnchorCell.Y, 22158SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22161success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22188if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22193if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22199SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22200success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22238if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22243if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22270success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22297if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22302if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22309success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22347if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22384int oldEdgeRowIndex = _ptCurrentCell.Y; 22394_ptAnchorCell.Y, 22401SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22405success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22432if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22450SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22453success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22489if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22494if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22499success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22548if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22555int oldEdgeRowIndex = _ptCurrentCell.Y; 22565_ptAnchorCell.Y, 22570_ptCurrentCell.Y, 22578if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22583if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22589SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22592_ptCurrentCell.Y, 22623if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, forCurrentCellChange: true)) 22628if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22634SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, selected: true); 22637_ptCurrentCell.Y, 22673if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22678if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22686success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22691if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22703success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22726if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22731if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22738success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22766if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22785int oldEdgeRowIndex = _ptCurrentCell.Y; 22790_ptAnchorCell.Y, 22795success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22800if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22817SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22818SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22821success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22844if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22862SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22865success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22889if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22894if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22899success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22928if (_ptCurrentCell.Y == -1) 22938nextScreenVisibleRowIndex = _ptCurrentCell.Y; 22954_ptCurrentCell.Y, 23030Debug.Assert(_ptAnchorCell.Y >= 0); 23032int oldEdgeRowIndex = _ptCurrentCell.Y; 23033if (_ptAnchorCell.Y == -1) 23042_ptAnchorCell.Y, 23070Debug.Assert(_ptAnchorCell.Y >= 0); 23071if (_ptAnchorCell.Y == -1) 23076if (_ptAnchorCell.Y < nextScreenVisibleRowIndex) 23078SelectRowRange(_ptAnchorCell.Y, nextScreenVisibleRowIndex, true); 23082SelectRowRange(nextScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23106Debug.Assert(_ptAnchorCell.Y >= 0); 23107if (_ptAnchorCell.Y == -1) 23112if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23115if (_ptAnchorCell.Y < nextScreenVisibleRowIndex) 23117SelectRowRange(_ptAnchorCell.Y, nextScreenVisibleRowIndex, true); 23121SelectRowRange(nextScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23127int oldEdgeRowIndex = _ptCurrentCell.Y; 23132_ptAnchorCell.Y, 23139if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23189if (_ptCurrentCell.Y == -1) 23199previousScreenVisibleRowIndex = _ptCurrentCell.Y; 23289Debug.Assert(_ptAnchorCell.Y >= 0); 23291int oldEdgeRowIndex = _ptCurrentCell.Y; 23301_ptAnchorCell.Y, 23328Debug.Assert(_ptAnchorCell.Y >= 0); 23329if (_ptAnchorCell.Y == -1) 23334if (_ptAnchorCell.Y < previousScreenVisibleRowIndex) 23336SelectRowRange(_ptAnchorCell.Y, previousScreenVisibleRowIndex, true); 23340SelectRowRange(previousScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23364Debug.Assert(_ptAnchorCell.Y >= 0); 23365if (_ptAnchorCell.Y == -1) 23370if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23373if (_ptAnchorCell.Y < previousScreenVisibleRowIndex) 23375SelectRowRange(_ptAnchorCell.Y, previousScreenVisibleRowIndex, true); 23379SelectRowRange(previousScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23385int oldEdgeRowIndex = _ptCurrentCell.Y; 23390_ptAnchorCell.Y, 23397if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23506if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23511if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23519int oldEdgeRowIndex = _ptCurrentCell.Y; 23529_ptAnchorCell.Y, 23536SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23539success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23566if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23571if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23577SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23578success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23616if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23621if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23648success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23675if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23680if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23687success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23725if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23730if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23769int oldEdgeRowIndex = _ptCurrentCell.Y; 23774_ptAnchorCell.Y, 23781SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23785success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23812if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23830SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23833success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23869if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23874if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23879success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23926if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23931if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23945int oldEdgeRowIndex = _ptCurrentCell.Y; 23950_ptAnchorCell.Y, 23953success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 23959SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23960success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23983if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23988if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23994SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23995success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24021if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24026if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24041success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24048success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24071if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24076if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24083success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24109if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24114if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24135int oldEdgeRowIndex = _ptCurrentCell.Y; 24140_ptAnchorCell.Y, 24145success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24157SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24158SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24161success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24184if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24189if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24202SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24205success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24229if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24234if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24239success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24302if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.Y) 24314if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24316Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y)); 24317SetSelectedRowCore(_ptCurrentCell.Y, true); 24539if (_ptCurrentCell.Y != -1) 24541previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 24581Debug.Assert(_ptAnchorCell.Y >= 0); 24583int oldEdgeRowIndex = _ptCurrentCell.Y; 24588_ptAnchorCell.Y, 24678Debug.Assert(_ptAnchorCell.Y >= 0); 24679if (_ptAnchorCell.Y == -1) 24685int oldEdgeRowIndex = _ptCurrentCell.Y; 24690_ptAnchorCell.Y, 24780Debug.Assert(_ptAnchorCell.Y >= 0); 24781SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, true); 24796SetSelectedRowCore(_ptCurrentCell.Y, false); 24870if (_ptAnchorCell.Y == -1) 24875if (_ptAnchorCell.Y >= previousVisibleRowIndex) 24877SelectRowRange(previousVisibleRowIndex, _ptAnchorCell.Y, true); 24881SelectRowRange(_ptAnchorCell.Y, previousVisibleRowIndex, true); 24963Debug.Assert(_ptAnchorCell.Y >= 0); 24964if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24967SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, true); 24972int oldEdgeRowIndex = _ptCurrentCell.Y; 24977_ptAnchorCell.Y, 24996if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24998SetSelectedRowCore(_ptCurrentCell.Y, false); 25003SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25037if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25085if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25090if (_ptAnchorCell.Y == -1) 25095if (_ptAnchorCell.Y >= previousVisibleRowIndex) 25097SelectRowRange(previousVisibleRowIndex, _ptAnchorCell.Y, true); 25101SelectRowRange(_ptAnchorCell.Y, previousVisibleRowIndex, true); 25112int oldEdgeRowIndex = _ptCurrentCell.Y; 25113if (_ptAnchorCell.Y == -1) 25122_ptAnchorCell.Y, 25167if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25273if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 25277bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25290object? nullValue = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: false).NullValue; 25308InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25349_ptCurrentCell.Y, 25363dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25366return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, dgvcpe.Value); 25388dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25391return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, val); 25472Debug.Assert(_ptCurrentCell.Y != -1); 25474DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 26011forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26012forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26029forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26030forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26043forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26044forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26208if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26271forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26272forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26300forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26301forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26350if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26783if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 26804int oldCurrentCellY = _ptCurrentCell.Y; 26850Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 26944OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 26953if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 26959InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 26960if (RowHeadersVisible && oldCurrentCellY != _ptCurrentCell.Y) 26962InvalidateCellPrivate(-1, _ptCurrentCell.Y); 26986AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27014int oldCurrentCellY = _ptCurrentCell.Y; 27056Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 28221_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28290if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 28294_ptCurrentCellCache.Y, 28350if (rowIndex1 == _ptCurrentCellCache.Y) 28354else if (rowIndex2 == _ptCurrentCellCache.Y) 28508if (_ptCurrentCell.Y != -1) 28510nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28531targetRowIndex = _ptCurrentCell.Y; 28603if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28669if (_ptCurrentCell.Y != -1) 28671previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28700targetRowIndex = _ptCurrentCell.Y; 28772if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 29098PositionEditingControl(rowIndex == -1 || _ptCurrentCell.Y != rowIndex, true, false); 29155HitTestInfo htiToUse = hti ?? HitTest(ptMouse.X, ptMouse.Y); 29161if (_ptMouseEnteredCell.X != htiToUse._col || _ptMouseEnteredCell.Y != htiToUse._row) 29166&& _ptMouseEnteredCell.Y >= -1 29167&& _ptMouseEnteredCell.Y < Rows.Count) 29169dgvce = new DataGridViewCellEventArgs(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29193&& _ptMouseEnteredCell.Y >= -1 29194&& _ptMouseEnteredCell.Y < Rows.Count) 29196DataGridViewCellEventArgs dgvce = new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29865HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 29866int mouseX = ptMouse.X, mouseY = ptMouse.Y; 29879hti = HitTest(mouseX, ptMouse.Y - yOffset - normOffset); 29888? HitTest(ptMouse.X - xOffset - (xOffset / Math.Abs(xOffset)), ptMouse.Y - yOffset - normOffset) 29889: HitTest(mouseX, ptMouse.Y - yOffset - normOffset); 29972HitTestInfo hti = HitTest(client.X, client.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (9)
446ColumnIndex == DataGridView!.MouseDownCellAddress.X && rowIndex == DataGridView.MouseDownCellAddress.Y; 541rowIndex == DataGridView.MouseDownCellAddress.Y) 564e.RowIndex == DataGridView.MouseDownCellAddress.Y && 660bool cellCurrent = (ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex); 725else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 781else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 818else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 892(DataGridView.CurrentCellAddress.Y == rowIndex && DataGridView.CurrentCellAddress.X == ColumnIndex)) 927(DataGridView.CurrentCellAddress.Y == rowIndex && DataGridView.CurrentCellAddress.X == ColumnIndex))
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (5)
408ptCurrentCell.Y == RowIndex && 1488if (ColumnIndex == ptCurrentCell.X && rowIndex == ptCurrentCell.Y) 2427|| (dataGridView.AllowUserToAddRowsInternal && rowIndex > -1 && rowIndex == dataGridView.NewRowIndex && rowIndex != dataGridView.CurrentCellAddress.Y) 2711ptCurrentCell.Y == rowIndex && 3913if (OwningRow.Index == DataGridView.CurrentCellAddress.Y)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (11)
434ptCurrentCell.Y == e.RowIndex && 521ptCurrentCell.Y == rowIndex && DataGridView.IsCurrentCellInEditMode) 767return ColumnIndex == DataGridView.MouseDownCellAddress.X && rowIndex == DataGridView.MouseDownCellAddress.Y; 790ptCurrentCell.Y == e.RowIndex && 894rowIndex == DataGridView.MouseDownCellAddress.Y) 917e.RowIndex == DataGridView.MouseDownCellAddress.Y && 1082ptCurrentCell.Y == rowIndex && DataGridView.IsCurrentCellInEditMode) 1148ptCurrentCell.Y == rowIndex) 1167isHot: DataGridView.MouseEnteredCellAddress.Y == rowIndex 1301if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1440else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (49)
808else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1018sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1020sortGlyphLocation.Y); 1023sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1025sortGlyphLocation.Y); 1028sortGlyphLocation.Y, 1030sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1033sortGlyphLocation.Y, 1035sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1038sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1040sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1047sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1049sortGlyphLocation.Y); 1052sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1054sortGlyphLocation.Y); 1057sortGlyphLocation.Y, 1059sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1062sortGlyphLocation.Y, 1064sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1067sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1069sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1078sortGlyphLocation.Y + s_sortGlyphHeight - line - 1, 1080sortGlyphLocation.Y + s_sortGlyphHeight - line - 1); 1085sortGlyphLocation.Y + s_sortGlyphHeight - s_sortGlyphWidth / 2 - 1, 1087sortGlyphLocation.Y + s_sortGlyphHeight - s_sortGlyphWidth / 2); 1102sortGlyphLocation.Y + 1, 1104sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1107sortGlyphLocation.Y + 1, 1109sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1112sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1114sortGlyphLocation.Y + 1); 1117sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1119sortGlyphLocation.Y + 1); 1122sortGlyphLocation.Y, 1124sortGlyphLocation.Y); 1131sortGlyphLocation.Y + 1, 1133sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1136sortGlyphLocation.Y + 1, 1138sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1141sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1143sortGlyphLocation.Y + 1); 1146sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1148sortGlyphLocation.Y + 1); 1151sortGlyphLocation.Y, 1153sortGlyphLocation.Y); 1162sortGlyphLocation.Y + line + 2, 1164sortGlyphLocation.Y + line + 2); 1169sortGlyphLocation.Y + s_sortGlyphWidth / 2 + 1, 1171sortGlyphLocation.Y + s_sortGlyphWidth / 2 + 2);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (11)
1667if (ptCurrentCell.X == e.ColumnIndex && ptCurrentCell.Y == e.RowIndex) 1890DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1897if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1916bool cellCurrent = ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex; 2162new(middle.X - s_offset2X, middle.Y - 1), 2163new(middle.X + s_offset2X + 1, middle.Y - 1), 2164new(middle.X, middle.Y + s_offset2Y) 2181Point pt1 = new(middle.X - (s_nonXPTriangleWidth - 1) / 2, middle.Y - s_nonXPTriangleHeight); 2182Point pt2 = new(middle.X + (s_nonXPTriangleWidth - 1) / 2, middle.Y - s_nonXPTriangleHeight); 2186g.DrawLine(SystemPens.ControlText, pt1.X, pt1.Y, pt2.X, pt2.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (3)
434&& rowIndex == DataGridView.MouseDownCellAddress.Y 468rowIndex == DataGridView.MouseDownCellAddress.Y && 493Debug.Assert(rowIndex == DataGridView.MouseDownCellAddress.Y);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
892&& ptCurrentCell.Y == rowIndex
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
908bool cellCurrent = ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex;
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (3)
690else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 777if (DataGridView.CurrentCellAddress.Y == rowIndex) 933if (DataGridView.CurrentCellAddress.Y == rowIndex)
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (2)
576if (ptCurrentCell.X == e.ColumnIndex && ptCurrentCell.Y == e.RowIndex && e.Button == MouseButtons.Left) 678bool cellCurrent = ptCurrentCell.X == ColumnIndex && ptCurrentCell.Y == rowIndex;
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (1)
253else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && DataGridView.MouseEnteredCellAddress.X == ColumnIndex)
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
510public void Draw(Graphics g, Point pt, int index) => Draw(g, pt.X, pt.Y, index);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
302if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND)
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (1)
65Link? hit = owner.PointInLink(p.X, p.Y);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1504return IndexFromPoint(p.X, p.Y);
System\Windows\Forms\Controls\ListView\ListView.cs (8)
3219return FindNearestItem(dir, point.X, point.Y); 3710public ListViewHitTestInfo HitTest(Point point) => HitTest(point.X, point.Y); 4385item = GetItemAt(pos.X, pos.Y); 5158int scrollY = GetItemPosition(toLVItem).Y - GetItemPosition(fromLVItem).Y; 6001AccessibleObject? accessibilityObject = AccessibilityObject.HitTest(screenPoint.X, screenPoint.Y); 6724OnMouseClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 6729OnMouseUp(new MouseEventArgs(button, 1, pos.X, pos.Y, 0));
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (1)
293ListViewHitTestInfo hitTestInfo = owningListView.HitTest(point.X, point.Y);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
646_listView.SetItemPosition(Index, _position.X, _position.Y);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarButtonAccessibleObject.cs (1)
83SendMouseInput(previousPosition.X, previousPosition.Y, MOUSE_EVENT_FLAGS.MOUSEEVENTF_MOVE | MOUSE_EVENT_FLAGS.MOUSEEVENTF_ABSOLUTE);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1332public HitTestInfo HitTest(Point point) => HitTest(point.X, point.Y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (16)
1893if (y >= (location.Y - s_cyDivider) && 1894y <= (location.Y + 1)) 1905if (y >= (location.Y - s_cyDivider) && 1906y <= (location.Y + 1)) 1920int gridTop = _gridView.Location.Y; 1940int high = _gridView.Location.Y + MinGridHeight; 2396OnMouseMove(new MouseEventArgs(e.Button, e.Clicks, newPoint.X, newPoint.Y, e.Delta)); 2412OnMouseDown(new MouseEventArgs(e.Button, e.Clicks, newPoint.X, newPoint.Y, e.Delta)); 2633int maxSpace = endSize - (_gridView.Location.Y + MinGridHeight); 2720endSize = _helpPane.Location.Y - s_cyDivider; 2754endSize = _commandsPane.Location.Y - s_cyDivider; 2757_gridView.Size = new Size(Size.Width, endSize - _gridView.Location.Y); 2892pevent.Graphics.FillRectangle(backgroundBrush, new Rectangle(0, 0, width, psheetLoc.Y)); 2894int yLast = psheetLoc.Y + _gridView.Size.Height; 2901new Rectangle(0, yLast, width, _commandsPane.Location.Y - yLast)); 2910new Rectangle(0, yLast, width, _helpPane.Location.Y - yLast));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
237LinkLabel.Link link = Label.Links.Add(links[i].X, links[i].Y, _verbs[i]);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (2)
310int y = _detailsButton.Location.Y + _detailsButton.Height + _detailsButton.Margin.Bottom; 316y += parent.Location.Y;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (29)
481return new Point(point.X + (rect.Width / 2), point.Y + (rect.Height / 2)); 633if (pt.Y > propertyGridViewBottom) 638if (pt.Y + rect.Height > propertyGridViewBottom) 640rect.Height = propertyGridViewBottom - pt.Y; 643return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height); 702g.TranslateTransform(newOrigin.X, newOrigin.Y); 703r.Offset(-newOrigin.X, -newOrigin.Y); 1135clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1190clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1452if (rectScreen.Y + rectScreen.Height < (size.Height + location.Y + EditTextBox.Height)) 1478_dropDownHolder.SetBounds(location.X, location.Y, size.Width, size.Height); 1688pt.Y = (y - _location.Y) / (1 + RowHeight); 1929rect.Y = row * (RowHeight + 1) + 1 + _location.Y; 2631Math.Abs(screenPoint.Y - _rowSelectPos.Y) < SystemInformation.DoubleClickSize.Height) 3015GridEntry? gridEntry = GetGridEntryFromRow(pos.Y); 3020Rectangle r = GetRectangle(pos.Y, RowLabel); 3071rowMoveCurrent = point.Y; 3094Rectangle itemRect = GetRectangle(point.Y, point.X); 3314startRow = Math.Max(0, startPosition.Y); 3319endRow = endPosition.Y; 3341g.DrawLine(splitterPen, _labelWidth, location.Y, _labelWidth, visibleCount * (RowHeight + 1) + location.Y); 3359currentRowHeight = i * (RowHeight + 1) + location.Y; 3381currentRowHeight = visibleCount * (RowHeight + 1) + location.Y; 5281mouseLoc = FindPosition(mouseLoc.X, mouseLoc.Y); 5288GridEntry? curEntry = GetGridEntryFromRow(mouseLoc.Y); 5296Rectangle itemRect = GetRectangle(mouseLoc.Y, mouseLoc.X); 5302tipPt = curEntry.GetLabelToolTipLocation(mouseLoc.X - itemRect.X, mouseLoc.Y - itemRect.Y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (4)
435newBounds.Height = Math.Max(s_minDropDownSize.Height, _dragBaseRect.Height + (dragPoint.Y - _dragStart.Y)); 443int delta = dragPoint.Y - _dragStart.Y;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (2)
435Point position = owner.FindPosition(point.X, point.Y); 438GridEntry? gridEntry = owner.GetGridEntryFromRow(position.Y);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2209Point wpt = new(pt.X, pt.Y);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (4)
132MousePosition.Y, 138MousePosition.Y, 237MousePosition.Y, 243MousePosition.Y,
System\Windows\Forms\Controls\Splitter\Splitter.cs (2)
779delta = y - _anchor.Y; 959int size = GetSplitSize(splitTarget, x - Left + _anchor.X, y - Top + _anchor.Y);
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
394r.Y -= p.Y; 594if (value.X < 0 || value.Y < 0)
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
128clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 129clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
586int deltaBottomEdge = Math.Abs(rootHwndClientArea.bottom - gripLocation.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (8)
2165int adjacentSide = otherItemMidLocation.Y - midPointOfCurrent.Y; 2606if (location.X != x || location.Y != y) 2626if (location.X != x || location.Y != y) 3331mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 3387mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 3431mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 4514cursorLocation.Y += Cursor.Size.Height - currentCursor.HotSpot.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (3)
150new(middle.X - s_offsetPixels, middle.Y - 1), 151new(middle.X + s_offsetPixels + 1, middle.Y - 1), 152new(middle.X, middle.Y + s_offsetPixels)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (2)
1040dropDownBounds.Location = new Point(start.X + offset.X, start.Y + offset.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (2)
336dropDownBounds.Location = new Point(itemScreenLocation.X + offset.X, itemScreenLocation.Y + offset.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (4)
364_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, maxCheckSize.Width, _maxItemSize.Height), ContentAlignment.MiddleCenter); 369_imageRectangle = LayoutUtils.Align(maxImageSize, new Rectangle(nextPoint.X, nextPoint.Y, maxImageSize.Width, _maxItemSize.Height), ContentAlignment.MiddleCenter); 380_checkRectangle = LayoutUtils.Align(maxCheckSize, new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth, _maxItemSize.Height), ContentAlignment.MiddleCenter); 399_checkRectangle = LayoutUtils.Align(LayoutUtils.UnionSizes(maxCheckSize, maxImageSize), new Rectangle(nextPoint.X, nextPoint.Y, checkAndImageMarginWidth - 1, _maxItemSize.Height), ContentAlignment.MiddleCenter);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (2)
146int deltaY = currentLocation.Y - _startLocation.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3457toPoint.Y += currentToolStripItemLocation.Y; 3469fromPoint.Y += currentToolStripItemLocation.Y; 3484fromPoint.Y -= currentToolStripItemLocation.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (4)
809if (clientLocation.X < 0 || clientLocation.Y < 0) 861index = (clientLocation.Y <= Padding.Left) ? 0 : index; 894Point endLocation = (Orientation == Orientation.Horizontal) ? new Point(clientLocation.X, row.Bounds.Y) : new Point(row.Bounds.X, clientLocation.Y); 959cursorLoc.Y = Cursor.Position.Y;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.VerticalRowManager.cs (6)
151int deltaY = clientEndLocation.Y - clientStartLocation.Y; 427if (cell.Bounds.Y >= locationToDrag.Y) 456requiredSpace += locationToDrag.Y; 506lastCellMargin.Top = Math.Max(0, locationToDrag.Y - nextCell.Bounds.Bottom); 547cellMargin.Top = Math.Max(0, locationToDrag.Y - Row.Margin.Top);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (27)
209middle.Y - Offset2Y, 211middle.Y + Offset2Y); 214middle.Y - Offset2Y + 1, 216middle.Y + Offset2Y + 1); 862Rectangle bottomLeftParentVerticalPixels = new(bottomLeft.X, bottomLeft.Y - 1, 1, 2); 865Rectangle bottomRightHorizontalPixels = new(bottomRight.X - 1, bottomRight.Y, 2, 1); 866Rectangle bottomRightVerticalPixels = new(bottomRight.X, bottomRight.Y - 1, 1, 2); 873topRightHorizontalPixels = new Rectangle(topRight.X - 1, topRight.Y, 1, 1); 874topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 2); 878topRightHorizontalPixels = new Rectangle(topRight.X - 2, topRight.Y, 2, 1); 879topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 3); 1149b.TranslateTransform(parent.Width - control.Location.X, parent.Height - control.Location.Y); 1307g.FillRectangle(brush, top1.X, top1.Y, 1, 1); 1308g.FillRectangle(brush, top2.X, top2.Y, 1, 1); 1396Rectangle otherBottom = new(bottomLeft.X, bottomLeft.Y - 2, 1, 1); 1657new(middle.X - Offset2X, middle.Y + 1), 1658new(middle.X + Offset2X + 1, middle.Y + 1), 1659new(middle.X, middle.Y - Offset2Y) 1663new(middle.X + Offset2X, middle.Y - Offset2Y - 1), 1664new(middle.X + Offset2X, middle.Y + Offset2Y + 1), 1665new(middle.X - 1, middle.Y) 1669new(middle.X - Offset2X, middle.Y - Offset2Y - 1), 1670new(middle.X - Offset2X, middle.Y + Offset2Y + 1), 1671new(middle.X + 1, middle.Y) 1675new(middle.X - Offset2X, middle.Y - 1), 1676new(middle.X + Offset2X + 1, middle.Y - 1), 1677new(middle.X, middle.Y + Offset2Y)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (12)
671arrow[0] = new(middle.X - Offset2X, middle.Y + 1); 672arrow[1] = new(middle.X + Offset2X + 1, middle.Y + 1); 673arrow[2] = new(middle.X, middle.Y - Offset2Y); 677arrow[0] = new(middle.X + Offset2X, middle.Y - s_offset4Y); 678arrow[1] = new(middle.X + Offset2X, middle.Y + s_offset4Y); 679arrow[2] = new(middle.X - horizontalOffset, middle.Y); 683arrow[0] = new(middle.X - Offset2X, middle.Y - s_offset4Y); 684arrow[1] = new(middle.X - Offset2X, middle.Y + s_offset4Y); 685arrow[2] = new(middle.X + horizontalOffset, middle.Y); 689arrow[0] = new(middle.X - Offset2X, middle.Y - 1); 690arrow[1] = new(middle.X + Offset2X + 1, middle.Y - 1); 691arrow[2] = new(middle.X, middle.Y + Offset2Y);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
226return (check.Y <= (orig.Top + heightUnit)) ? RelativeLocation.Above : RelativeLocation.Below;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (12)
480new Point(middle.X - 2, middle.Y + 1), 481new Point(middle.X + 3, middle.Y + 1), 482new Point(middle.X, middle.Y - 2) 486new Point(middle.X + 2, middle.Y - 4), 487new Point(middle.X + 2, middle.Y + 4), 488new Point(middle.X - 2, middle.Y) 492new Point(middle.X - 2, middle.Y - 4), 493new Point(middle.X - 2, middle.Y + 4), 494new Point(middle.X + 2, middle.Y) 498new Point(middle.X - 2, middle.Y - 1), 499new Point(middle.X + 3, middle.Y - 1), 500new Point(middle.X, middle.Y + 2)
System\Windows\Forms\Controls\TreeView\TreeView.cs (8)
1633public TreeViewHitTestInfo HitTest(Point pt) => HitTest(pt.X, pt.Y); 1674public TreeNode? GetNodeAt(Point pt) => GetNodeAt(pt.X, pt.Y); 3039OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), button, 1, pos.X, pos.Y)); 3040OnClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3041OnMouseClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3069OnMouseUp(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3314OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), _downButton, 1, point.X, point.Y)); 3326OnNodeMouseDoubleClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), _downButton, 2, point.X, point.Y));
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
908return new MouseEventArgs(e.Button, e.Clicks, point.X, point.Y, e.Delta);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
461htmlDoc2.Value->elementFromPoint(point.X, point.Y, &iHTMLElement).ThrowOnFailure();
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (2)
304htmlWindow.Value->moveTo(point.X, point.Y).ThrowOnFailure(); 410htmlWindow.Value->scrollTo(point.X, point.Y).ThrowOnFailure();
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserSite.cs (1)
44if (pt->X == 0 && pt->Y == 0)
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
791Bounds = new Rectangle(location.X, location.Y, extent.Width, extent.Height); 1131sz.Height = phm.Y;
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
172PInvoke.SetViewportOrgEx(hdc, originalOrigin.X + _windowBounds.Width - 1, originalOrigin.Y, lppt: null);
System\Windows\Forms\Form.cs (5)
927SetDesktopLocation(value.X, value.Y); 1365Location.Y, 3937if (p.Y < screenRect.Y) 3941else if (p.Y + s.Height > screenRect.Y + screenRect.Height) 6995point.Y >= (clientSize.Height - SizeGripSize) &&
System\Windows\Forms\Input\Cursor.cs (1)
187set => PInvoke.SetCursorPos(value.X, value.Y);
System\Windows\Forms\Input\HandledMouseEventArgs.cs (1)
14: this(button, clicks, location.X, location.Y, delta, false)
System\Windows\Forms\Input\MouseEventArgs.cs (1)
32Y = location.Y;
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
691return new Rectangle(topLeftPoint.X, topLeftPoint.Y, clientRectangle.right, clientRectangle.bottom);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (7)
453if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 1365_splitterRect.Y = Location.Y + SplitterDistanceInternal; 1405r.Y = Panel1.Location.Y + splitSize; 1495delta = y - _anchor.Y; 1572_splitterRect.Y = Location.Y; 1579_splitterRect.Y = Location.Y + SplitterDistanceInternal;
System\Windows\Forms\Layout\FlowLayout.ContainerProxy.cs (1)
157pt.Offset(ptScroll.Y, 0);
System\Windows\Forms\Layout\LayoutUtils.cs (1)
436(point.Y, point.X) = (point.X, point.Y);
System\Windows\Forms\MDI\MDIClient.cs (1)
255if (wp.ptMinPosition.Y == -1)
System\Windows\Forms\NotifyIcon.cs (1)
617_contextMenuStrip.ShowInTaskbar(pt.X, pt.Y);
System\Windows\Forms\Printing\PrintPreviewControl.cs (11)
629offset.Y -= Position.Y; 632int borderPixelsY = PhysicalToPixels(Border, _screenDPI.Y); 665int y = offset.Y + borderPixelsY * (row + 1) + lastImageSize.Y; 752new(PixelsToPhysical(pixels.Width, dpi.X), PixelsToPhysical(pixels.Height, dpi.Y)); 758new(PhysicalToPixels(physical.Width, dpi.X), PhysicalToPixels(physical.Height, dpi.Y)); 765_vScrollBar.Value = Math.Clamp(value.Y, _vScrollBar.Minimum, _vScrollBar.Maximum); 919pos = vertical ? locPos.Y : locPos.X; 952pos = vertical ? locPos.Y : locPos.X; 999pos = locPos.Y; 1017pos = locPos.Y;
System\Windows\Forms\Rendering\ControlPaint.cs (3)
460transform.Translate(scrollOffset.X, scrollOffset.Y); 1856PInvoke.MoveToEx(desktopDC, start.X, start.Y, lppt: null); 1857PInvoke.LineTo(desktopDC, end.X, end.Y);
System\Windows\Forms\Rendering\DCMapping.cs (3)
48viewportOrg.Y + bounds.Top, 50viewportOrg.Y + bounds.Bottom); 61viewportOrg.Y + bounds.Top,
System\Windows\Forms\Scrolling\ScrollableControl.cs (4)
126SetDisplayRectLocation(-value.X, -value.Y); 833SetDisplayRectLocation(scrollLocation.X, scrollLocation.Y); 893yCalc += activeControl.AutoScrollOffset.Y; 1113if (pt.X != 0 || pt.Y != 0)
System\Windows\Forms\ToolTip\ToolTip.cs (16)
1321cursorLocation.Y < rect.top || cursorLocation.Y > rect.bottom) 1336SetTrackPosition(p.X, p.Y); 1411int pointY = r.top + point.Y; 1431int pointY = r.top + point.Y; 1499pointY = optimalPoint.Y; 1944if (moveToLocation.Y + tipSize.Height > screen.WorkingArea.Bottom) 1953moveToLocation.Y, 2013cursorLocation.Y >= r.top && cursorLocation.Y <= r.bottom) 2186wp->y = cursorPos.Y; 2187if (wp->y + wp->cy + currentCursor.Size.Height - currentCursor.HotSpot.Y > screen.WorkingArea.Bottom) 2189wp->y = cursorPos.Y - wp->cy; 2193wp->y = cursorPos.Y + currentCursor.Size.Height - currentCursor.HotSpot.Y; 2211wp->y = tipInfo.Position.Y;
System.Windows.Forms.Design (335)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (3)
252new(middle.X - s_offset2X, middle.Y - 1), 253new(middle.X + s_offset2X + 1, middle.Y - 1), 254new(middle.X, middle.Y + s_offset2Y)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (3)
174_button.Location = new Point(EditRegionLocation.X + EditRegionSize.Width - buttonHeight - EditorLineButtonPadding, EditRegionLocation.Y + EditorLineButtonPadding + 1); 350if (rectScreen.Bottom < (dropDownSize.Height + editorLocation.Y + editorBounds.Height)) 374if (rectScreen.Bottom < (dropDownSize.Height + editorLocation.Y + editorBounds.Height))
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
114EditControl!.Location = new Point(_editRegionLocation.X + GetTextBoxLeftPadding(textBoxPreferredHeight) + 1 + specialPadding, _editRegionLocation.Y + TextBoxLineInnerPadding + 1);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (2)
33FillRectWithCellBounds(cellPt.X, cellPt.Y, ref rect); 43return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.cs (1)
45int cell = GetCellFromLocationMouse(point.X, point.Y);
System\Drawing\Design\ColorEditor.ColorPalette.cs (15)
180private static int Get1DFrom2D(Point pt) => Get1DFrom2D(pt.X, pt.Y); 219FillRectWithCellBounds(_focus.X, _focus.Y, ref r); 2251 + Get1DFrom2D(_focus.X, _focus.Y)); 276SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 281SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 291SetFocus(_focus with { Y = _focus.Y - 1 }); 294SetFocus(_focus with { Y = _focus.Y + 1 }); 312if (cell2D.X != -1 && cell2D.Y != -1 && cell2D != _focus) 326if (cell2D.X != -1 && cell2D.Y != -1 && cell2D != _focus) 340if (cell2D.X != -1 && cell2D.Y != -1) 343SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 392if (_focus.X == x && _focus.Y == y && Focused) 425int cell = Get1DFrom2D(_focus.X, _focus.Y); 444if (newFocus.Y < 0) 454if (newFocus.Y >= CellsDown)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (3)
133region.Translate(scrollPosition.X, scrollPosition.Y); 150rectangle.Offset(scrollPosition.X, scrollPosition.Y); 320pt.Offset(pt1.X, pt1.Y);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (3)
99if (ProcessMouseMessage(mhs->hwnd, (MessageId)(nuint)wparam, mhs->pt.X, mhs->pt.Y)) 180Message m = Message.Create(hwnd, msg, 0u, PARAM.FromLowHigh(pt.Y, pt.X)); 196if (!adornerWindow.WndProcProxy(ref m, pt.X, pt.Y))
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (3)
179Size delta = new(Math.Abs(mouseLoc.X - InitialDragPoint.X), Math.Abs(mouseLoc.Y - InitialDragPoint.Y)); 184screenLoc.Offset(mouseLoc.X, mouseLoc.Y);
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (1)
161_bounds = (new Rectangle(topRight.X, topRight.Y, GlyphImageOpened.Width, GlyphImageOpened.Height));
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (13)
216controlRect.Y += offset.Y; // offset for non-client area 709if (directionOffset.Y != 0) 714int minRange = directionOffset.Y < 0 ? 0 : currentBounds.Y; 715int maxRange = directionOffset.Y < 0 ? currentBounds.Bottom : int.MaxValue; 716offset.Y = FindSmallestValidDistance(_horizontalSnapLines, _horizontalDistances, minRange, maxRange, directionOffset.Y); 717if (offset.Y != 0) 720IdentifyAndStoreValidLines(_horizontalSnapLines, _horizontalDistances, currentBounds, offset.Y); 721if (directionOffset.Y < 0) 732_cachedDragRect.Offset(offset.X, offset.Y); 739if (offset.Y != 0) 1100_dragOffset = new Point(dragBounds.X - _dragOffset.X, dragBounds.Y - _dragOffset.Y); 1106_targetHorizontalSnapLines[i].AdjustOffset(_dragOffset.Y); 1144Rectangle tempDragRect = new(dragBounds.Left + snapPoint.X, dragBounds.Top + snapPoint.Y, dragBounds.Width, dragBounds.Height);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (22)
143Point controlLocation = new(dragLoc.X - _parentLocation.X, dragLoc.Y - _parentLocation.Y); 147int yDelta = controlLocation.Y % _parentGridSize.Height; 271Point pt = new(dropPoint.X, dropPoint.Y); 276pt.Offset(-ptScroll.X, -ptScroll.Y); 494initialDropPoint.Y + _dragComponents[i].positionOffset.Y); 734mouseLoc.Y - _initialMouseLoc.Y + _dragComponents[_primaryComponentIndex].originalControlLocation.Y); 738Rectangle newRect = new(newPosition.X, newPosition.Y, 771newPosition.Y += _lastSnapOffset.Y; 783mouseLoc.Y - _initialMouseLoc.Y + _originalDragImageLocation.Y); 785newPosition.Y += _lastSnapOffset.Y; 800invalidDragRegion.Translate(mouseLoc.X - _initialMouseLoc.X + _lastSnapOffset.X, mouseLoc.Y - _initialMouseLoc.Y + _lastSnapOffset.Y); 943dragControl.Location.Y - primaryControl.Location.Y); 1028_dragComponents[i].draggedLocation.Y - _dragImageRect.Y,
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (18)
164lines.Add(new SnapLine(SnapLineType.Bottom, loc.Y - 1)); 167lines.Add(new SnapLine(SnapLineType.Horizontal, loc.Y + _primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always)); 172lines.Add(new SnapLine(SnapLineType.Top, loc.Y)); 175lines.Add(new SnapLine(SnapLineType.Horizontal, loc.Y - _primaryControl.Margin.Top, SnapLine.MarginTop, SnapLinePriority.Always)); 276_parentLocation.Y -= control.Location.Y; 482Point mouseLocAbs = new(mouseLoc.X, mouseLoc.Y); 484if (mouseLocAbs.X == _lastMouseAbs.X && mouseLocAbs.Y == _lastMouseAbs.Y) 492if (Math.Abs(_initialPoint.X - mouseLoc.X) > DesignerUtils.MinDragSize.Width / 2 || Math.Abs(_initialPoint.Y - mouseLoc.Y) > DesignerUtils.MinDragSize.Height / 2) 547_lastMouseAbs = new Point(mouseLoc.X, mouseLoc.Y); 611mouseLoc.Y += _lastSnapOffset.Y; 672pixelHeight = mouseLoc.Y - controlBounds.Bottom; 676pixelHeight = AdjustPixelsForIntegralHeight(control, mouseLoc.Y - _initialPoint.Y); 689yOffset = controlBounds.Y - mouseLoc.Y; 693yOffset = AdjustPixelsForIntegralHeight(control, _initialPoint.Y - mouseLoc.Y);
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (2)
250int delta = isColumn ? mouseLoc.X - _lastMouseLoc.X : mouseLoc.Y - _lastMouseLoc.Y;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (9)
145offset.Y = _lastRectangle.Top - mouseLoc.Y; 151offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 167offset.Y = _lastRectangle.Top - mouseLoc.Y; 173offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 216offset.Y = _lastRectangle.Top - mouseLoc.Y; 256ToolboxSnapDragDropEventArgs se = CreateToolboxSnapArgs(e, new Point(e.X - screenOffset.X, e.Y - screenOffset.Y)); 308mouseLoc.Y - DesignerUtils.s_boxImageSize / 2, 318newRectangle.Offset(_lastOffset.X, _lastOffset.Y); 343Rectangle statusRect = new(newRectangle.X - adornerServiceOrigin.X, newRectangle.Y - adornerServiceOrigin.Y, 0, 0);
System\Windows\Forms\Design\CommandSet.cs (43)
819moveOffsetY = snappedOffset.Y; 892moveOffsetY = loc.Y - primaryControl.Location.Y; 1043loc.Y = primaryLocation.Y + primarySize.Height - size.Height; 1051loc.Y = primarySize.Height / 2 + primaryLocation.Y - size.Height / 2; 1084loc.Y = primaryLocation.Y; 1199delta = loc.Y % gridSize.Height; 1304if (loc.Y < top) 1305top = loc.Y; 1308if (loc.Y + size.Height > bottom) 1309bottom = loc.Y + size.Height; 2433loc.Y = (loc.Y / grid.Height) * grid.Height; 2703: (lastSize.Height + lastLoc.Y - curLoc.Y - total) / (selectedObjects.Length - 1); 2833curLoc.Y = lastLoc.Y + lastSize.Height; 2840if (curLoc.Y < primaryLoc.Y) 2841curLoc.Y = primaryLoc.Y; 2846if (curLoc.Y > primaryLoc.Y) 2847curLoc.Y = primaryLoc.Y; 2863curLoc.Y = lastLoc.Y + lastSize.Height + nEqualDelta; 3256if (min.Y > loc.Y) 3258min.Y = loc.Y; 3266if (max.Y < loc.Y + size.Height) 3268max.Y = loc.Y + size.Height; 3278Point offset = new(-min.X, -min.Y); 3293parentOffset.Y -= (max.Y - min.Y) / 2; 3375groupEndY = parentOffset.Y + max.Y - min.Y; 3380groupEndY = parentOffset.Y + gridSize.Height; 3404offset.Offset(parentOffset.X, parentOffset.Y); 3417newLoc.Offset(offset.X, offset.Y); 3474return pLoc.X == qLoc.X ? pLoc.Y - qLoc.Y : pLoc.X - qLoc.X; 3492return pLoc.Y == qLoc.Y ? pLoc.X - qLoc.X : pLoc.Y - qLoc.Y;
System\Windows\Forms\Design\ComponentTray.cs (36)
604SetTrayLocation(comp, new Point(tc.Location.X - _autoScrollPosBeforeDragging.X, tc.Location.Y - _autoScrollPosBeforeDragging.Y)); 608AutoScrollPosition = new Point(-_autoScrollPosBeforeDragging.X, -_autoScrollPosBeforeDragging.Y); 660mcs.ShowContextMenu(MenuCommands.TraySelectionMenu, location.X, location.Y); 664mcs.ShowContextMenu(MenuCommands.ComponentTrayMenu, location.X, location.Y); 988return new Point(loc.X - autoScrollLoc.X, loc.Y - autoScrollLoc.Y); 1200_mouseDragWorkspace.Y = Math.Min(start.Y, end.Y); 1202_mouseDragWorkspace.Height = Math.Abs(end.Y - start.Y); 1335Y = Math.Min(_mouseDragStart.Y, e.Y), 1337Height = Math.Abs(e.Y - _mouseDragStart.Y) 1569location = new Point(location.X + autoScrollLoc.X, location.Y + autoScrollLoc.Y); 1613if (location.X == -1 && location.Y == -1) 1820_whiteSpace.Y = _whiteSpace.Y * 2 + 3; 1826Point newLoc = new(display.X + _whiteSpace.X, display.Y + _whiteSpace.Y); 1838newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 1860newLoc.Y += bounds.Height + _whiteSpace.Y; 1873newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 2191Math.Abs(_mouseDragLast.Y - newPt.Y) < minDrag.Height)) 2210if (_tray._selectionUISvc is not null && _tray._selectionUISvc.BeginDrag(SelectionRules.Visible | SelectionRules.Moveable, _mouseDragLast.X, _mouseDragLast.Y)) 2251mcs.ShowContextMenu(MenuCommands.TraySelectionMenu, location.X, location.Y); 2533if (location.X == -1 && location.Y == -1) 2547pt.Offset(pt1.X, pt1.Y); 2550pt.Offset(Location.X, Location.Y); 2769if (tcLoc1.X == tcLoc2.X && tcLoc1.Y == tcLoc2.Y) 2775if (tcLoc1.Y + height <= tcLoc2.Y) 2781if (tcLoc2.Y + height <= tcLoc1.Y)
System\Windows\Forms\Design\ControlCommandSet.cs (5)
498lines.Add(new SnapLine(SnapLineType.Bottom, pt.Y + primaryControl.Height - 1)); 499lines.Add(new SnapLine(SnapLineType.Horizontal, pt.Y + primaryControl.Height + primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always)); 641primaryControlsize += new Size(snappedOffset.X, snappedOffset.Y); 653moveOffsetY = snappedOffset.Y; 714Rectangle dragRect = new(primaryControl.Location.X, primaryControl.Location.Y,
System\Windows\Forms\Design\ControlDesigner.cs (18)
89loc.Offset(-pt.X, -pt.Y); 99value.Offset(pt.X, pt.Y); 301return new Point(Math.Abs(nativeOffset.X - offset.X), nativeOffset.Y - offset.Y); 1401Math.Abs(_mouseDragLast.Y - y) < minDrag.Height)) 1893if (button == MouseButtons.Left && IsDoubleClick(location.X, location.Y)) 1934mouseHandler.OnMouseDown(Component, button, location.X, location.Y); 1938OnMouseDragBegin(location.X, location.Y); 1948_lastMoveScreenY = location.Y; 1969if (_lastMoveScreenX != location.X || _lastMoveScreenY != location.Y) 1983mouseHandler.OnMouseMove(Component, location.X, location.Y); 1987OnMouseDragMove(location.X, location.Y); 1992_lastMoveScreenY = location.Y; 2085graphics.TranslateTransform(-point.X, -point.Y); 2211bool handled = GetService<ToolStripKeyboardHandlingService>()?.OnContextMenu(location.X, location.Y) ?? false; 2215if (location.X == -1 && location.Y == -1) 2221OnContextMenu(location.X, location.Y); 2400return PARAM.ToInt(pt.X, pt.Y);
System\Windows\Forms\Design\DesignerUtils.cs (2)
574newBounds.Y += e.Offset.Y; // snap to top - so move up our bounds 578newBounds.Y = originalBounds.Y - originalBounds.Height + e.Offset.Y;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (40)
230marginBounds.Offset(offset.X, offset.Y); 231bounds.Offset(offset.X, offset.Y); 450point1.Offset(-offset.X, -offset.Y); 451point2.Offset(-offset.X, -offset.Y); 460_oldPoint1.Y, 462_oldPoint2.Y - _oldPoint1.Y + 1); 484if (Math.Abs(point1.Y - point2.Y) <= MinIBar) 488graphics.DrawLine(pen, point1.X - IBarHalfSize, point1.Y, point1.X + IBarHalfSize, point1.Y); // top hat 489graphics.DrawLine(pen, point2.X - IBarHalfSize, point2.Y, point2.X + IBarHalfSize, point2.Y); // bottom hat 501point1.Y + i, 503point1.Y + i); // top hat 508point2.Y - i, 510point2.Y - i); // bottom hat 514graphics.DrawLine(pen, point1.X, point1.Y, point1.X, point1.Y + IBarHatHeight - 1); // top hat 515graphics.DrawLine(pen, point2.X, point2.Y, point2.X, point2.Y - IBarHatHeight + 1); // bottom hat 518graphics.DrawLine(pen, point1.X, point1.Y + IBarLineOffset, point2.X, point2.Y - IBarLineOffset); 527graphics.DrawLine(pen, point1.X, point1.Y - IBarHalfSize, point1.X, point1.Y + IBarHalfSize); // top hat 528graphics.DrawLine(pen, point2.X, point2.Y - IBarHalfSize, point2.X, point2.Y + IBarHalfSize); // bottom hat 540point1.Y - (IBarHatWidth - 1 - i * 2) / 2, 542point1.Y + (IBarHatWidth - 1 - i * 2) / 2); // left hat 547point2.Y - (IBarHatWidth - 1 - i * 2) / 2, 549point2.Y + (IBarHatWidth - 1 - i * 2) / 2); // right hat 553graphics.DrawLine(pen, point1.X, point1.Y, point1.X + IBarHatHeight - 1, point1.Y); // left hat 554graphics.DrawLine(pen, point2.X, point2.Y, point2.X - IBarHatHeight + 1, point2.Y); // right hat 557graphics.DrawLine(pen, point1.X + IBarLineOffset, point1.Y, point2.X - IBarLineOffset, point2.Y); 848int offset = HorizontalFlow ? controlOffset.Y : controlOffset.X; 856match = (HorizontalFlow && mouseLocation.Y <= offset) || (!HorizontalFlow && mouseLocation.X >= offset); 861match = (HorizontalFlow ? mouseLocation.Y : mouseLocation.X) <= offset;
System\Windows\Forms\Design\OleDragDropHandler.cs (9)
373newRect.Y = oldOffset.Y; 377newRect.Offset(oldOffset.X, oldOffset.Y); 394newRect.Y = newOffset.Y; 398newRect.Offset(newOffset.X, newOffset.Y); 605if ((Dragging && de.X == _dragBase.X && de.Y == _dragBase.Y) || 770bounds.Y = dropPt.Y + pt.Y; 845Rectangle offset = new(de.X - _dragBase.X, de.Y - _dragBase.Y, 0, 0); 968Point newOffset = _forceDrawFrames ? convertedPoint : new Point(de.X - _dragBase.X, de.Y - _dragBase.Y);
System\Windows\Forms\Design\ParentControlDesigner.cs (27)
313displayRectangle.Y += offset.Y; // offset for non-client area 466bounds.Y = location.Y; 491bounds.Y = DefaultControlLocation.Y; 497bounds.Y = selectedControl.Location.Y + GridSize.Height; 581pt.Offset(-ptScroll.X, -ptScroll.Y); // always want to add the control below/right of the AutoScrollPosition 802CreateToolCore(tool, location.X, location.Y, 0, 0, true, false); 926centeredLocation.Y = DefaultControlLocation.Y; 1109if (adjustedRect.Y < minimumLocation.Y) 1111adjustedRect.Y = minimumLocation.Y; 1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1162if (dragRect.Y - updatedRect.Y > halfGrid.Y) 1784offset.Y - _adornerWindowToScreenOffset.Y, 1817Point location = new(baseVar.X, baseVar.Y); 1819_statusCommandUI?.SetStatusInformation(new Rectangle(location.X, location.Y, offset.Width, offset.Height)); 1915_mouseDragOffset.Y = _mouseDragBase.Y; 1917_mouseDragOffset.Height = y - _mouseDragBase.Y; 1933_mouseDragBase.Y - _adornerWindowToScreenOffset.Y, 1934x - _mouseDragBase.X, y - _mouseDragBase.Y); 1937_mouseDragOffset.Height += offset.Y; 1970_mouseDragOffset.Y - _adornerWindowToScreenOffset.Y, 1984oldFrameRect.Y -= _adornerWindowToScreenOffset.Y; 2010_statusCommandUI?.SetStatusInformation(new Rectangle(offset.X, offset.Y, _mouseDragOffset.Width, _mouseDragOffset.Height)); 2185newLoc = new Point(controlLoc.X - parentLoc.X, controlLoc.Y - parentLoc.Y); 2190newLoc = new Point(controlLoc.X + oldParentLoc.X, controlLoc.Y + oldParentLoc.Y);
System\Windows\Forms\Design\ScrollableControlDesigner.cs (1)
33int hitTest = (int)PInvokeCore.SendMessage(f, PInvokeCore.WM_NCHITTEST, 0, PARAM.FromLowHigh(pt.X, pt.Y));
System\Windows\Forms\Design\SelectionUIHandler.cs (3)
413topProp.SetValue(component, adjustedLoc.Y); 417controls[i].Top = adjustedLoc.Y; 618Y = loc.Y;
System\Windows\Forms\Design\SelectionUIService.cs (13)
527if (((ISelectionUIService)this).BeginDrag(rules, anchor.X, anchor.Y)) 571if (((ISelectionUIService)this).BeginDrag(rules, anchor.X, anchor.Y)) 632Math.Abs(screenCoord.Y - _mouseDragAnchor.Y) < minDragSize.Height) 639if (((ISelectionUIService)this).BeginDrag(_dragRules, _mouseDragAnchor.X, _mouseDragAnchor.Y)) 660_mouseDragOffset.Y = screenCoord.Y - _mouseDragAnchor.Y; 680_mouseDragOffset.Y = screenCoord.Y - _mouseDragAnchor.Y; 681_mouseDragOffset.Height = _mouseDragAnchor.Y - screenCoord.Y; 685_mouseDragOffset.Height = screenCoord.Y - _mouseDragAnchor.Y;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (20)
247if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 252if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 257if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 258&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 266if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 287Debug.Assert(!(pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y), "Should be handled by top right check"); 288if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 293if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 294&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 302if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 389if (pt.Y < _outerRect.Y || pt.Y > _outerRect.Y + _outerRect.Height) 396&& pt.Y > _innerRect.Y 397&& pt.Y < _innerRect.Y + _innerRect.Height)
System\Windows\Forms\Design\StatusCommandUI.cs (1)
58bounds.Y = location.Y;
System\Windows\Forms\Design\TabControlDesigner.cs (1)
623y = p.Y;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (11)
497Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(newControlPosition.X, newControlPosition.Y); 583AddControlInternal(existingControl, oldPosition.X, oldPosition.Y); 593AddControlInternal(control, newControlPosition.X, newControlPosition.Y); 598Table.SetCellPosition(control, new TableLayoutPanelCellPosition(newControlPosition.X, newControlPosition.Y)); 1023if (pos.Y >= bounds.Bottom) 1027else if (pos.Y > bounds.Y) 1032if (pos.Y <= offset + rows[i]) 1267if (dropPoint.Y < 0 || dropPoint.Y >= rows.Length || dropPoint.X < 0 || dropPoint.X >= columns.Length) 1274Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(dropPoint.X, dropPoint.Y); 1294_curRow = cell.Y;
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1842if (offset.Y <= parentToolStrip.Items[0].Bounds.Y)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (3)
569if (dragBox != Rectangle.Empty && !dragBox.Contains(mouseLoc.X, mouseLoc.Y)) 979parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize); 1002ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (1)
493y = p.Y;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1346dropDownItem.DropDown.Location = new Point(dropDownItem.DropDown.Location.X + _commitedEditorNode.Bounds.Width - dropDownItem.Bounds.Width, dropDownItem.DropDown.Location.Y);
System.Windows.Forms.Design.Tests (2)
System\Windows\Forms\Design\DesignerUtilsTests.cs (2)
174cursorPoint.Y.Should().BeLessThanOrEqualTo(SystemInformation.VirtualScreen.Bottom); 175cursorPoint.Y.Should().BeGreaterThanOrEqualTo(SystemInformation.VirtualScreen.Top);
System.Windows.Forms.Primitives (11)
System\Windows\Forms\Automation\UiaTextRange.cs (4)
364Rectangle endlineRectangle = new(endlinePoint.X, endlinePoint.Y + 2, UiaTextProvider.EndOfLineWidth, Math.Abs(_provider.Logfont.lfHeight) + 1); 400Rectangle rectangle = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, clippingRectangle.Height); 405rectangle.Offset(mapClientToScreen.X, mapClientToScreen.Y); 866Rectangle rect = new(startPoint.X, startPoint.Y + 2, endPoint.X - startPoint.X, lineHeight);
System\Windows\Forms\DeviceContextExtensions.cs (5)
54DrawLine(hdc.HDC, hpen, p1.X, p1.Y, p2.X, p2.Y); 57DrawLine(hdc, hpen, p1.X, p1.Y, p2.X, p2.Y); 94PInvoke.MoveToEx(hdc, oldPoint.X, oldPoint.Y, lppt: null);
Windows\Win32\Foundation\Interop.PARAM.cs (1)
66=> FromLowHigh(point.X, point.Y);
Windows\Win32\UI\Accessibility\UiaPoint.cs (1)
12public static implicit operator UiaPoint(Point value) => new() { x = value.X, y = value.Y };
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\GdiExtensions.cs (1)
21float y = point.Y;
System.Windows.Forms.Tests (155)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
415Assert.Equal(expectedPosition.Y, actual.Y);
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (1)
348var result = listBox.AccessibilityObject.HitTest(testPoint.X, testPoint.Y);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (2)
1181Assert.Null(listView.AccessibilityObject.HitTest(point.X, point.Y)); 1381listView.AccessibilityObject.HitTest(point.X, point.Y);
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (3)
298Assert.Equal(expectedAccessibleObject, accessibleObject.HitTest(point.X, point.Y)); 316Assert.Equal(expectedAccessibleObject, accessibleObject.HitTest(point.X, point.Y)); 334Assert.Equal(expectedAccessibleObject, accessibleObject.HitTest(point.X, point.Y));
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (3)
527accessibleObject.HitTest(pointInThumb.X, pointInThumb.Y).Should().Be(accessibleObject.ThumbAccessibleObject); 532accessibleObject.HitTest(pointInFirstButton.X, pointInFirstButton.Y).Should().Be(accessibleObject.FirstButtonAccessibleObject); 538accessibleObject.HitTest(pointInLastButton.X, pointInLastButton.Y).Should().Be(accessibleObject.LastButtonAccessibleObject);
System\Windows\Forms\AccessibleObjects\TreeView.TreeViewAccessibleObjectTests.cs (3)
238Assert.Null(accessibleObject.HitTest(point.X, point.Y)); 253Assert.Equal(accessibleObject, accessibleObject.HitTest(point.X, point.Y)); 267Assert.Equal(node.AccessibilityObject, control.AccessibilityObject.HitTest(point.X, point.Y));
System\Windows\Forms\CheckBoxRendererTests.cs (4)
30Point point = new(control.Location.X, control.Location.Y); 66Point point = new(control.Location.X, control.Location.Y); 103Point point = new(control.Location.X, control.Location.Y); 137Point point = new(control.Location.X, control.Location.Y);
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (8)
445Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1); 511Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1);
System\Windows\Forms\ComboBoxTests.cs (1)
2778public void OnMouseDown(Point p) => base.OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, p.X, p.Y, 0));
System\Windows\Forms\ControlTests.Methods.cs (4)
12520yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 12526yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero, true }; 12594yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250 }; 12600yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero };
System\Windows\Forms\ControlTests.Properties.cs (24)
7181Assert.Equal(value.Y, control.Top); 7182Assert.Equal(value.Y, control.Bottom); 7185Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7203Assert.Equal(value.Y, control.Top); 7204Assert.Equal(value.Y, control.Bottom); 7207Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7271Assert.Equal(value.Y, control.Top); 7272Assert.Equal(value.Y, control.Bottom); 7275Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7294Assert.Equal(value.Y, control.Top); 7295Assert.Equal(value.Y, control.Bottom); 7298Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7373Assert.Equal(value.Y, control.Top); 7374Assert.Equal(value.Y, control.Bottom); 7377Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7398Assert.Equal(value.Y, control.Top); 7399Assert.Equal(value.Y, control.Bottom); 7402Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7484Assert.Equal(value.Y, control.Top); 7485Assert.Equal(value.Y, control.Bottom); 7488Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds); 7514Assert.Equal(value.Y, control.Top); 7515Assert.Equal(value.Y, control.Bottom); 7518Assert.Equal(new Rectangle(value.X, value.Y, 0, 0), control.Bounds);
System\Windows\Forms\CursorsTests.cs (2)
57Assert.True(hotSpot.Y >= 0 && hotSpot.Y <= cursor.Size.Height);
System\Windows\Forms\CursorTests.cs (6)
235Assert.True(hotSpot.Y >= 0 && hotSpot.Y <= cursor.Size.Height); 269Assert.True(position.Y >= virtualScreen.Y); 271Assert.True(position.Y <= virtualScreen.Bottom); 283Assert.True(position.Y >= 0); 289Assert.True(position.Y >= virtualScreen.Y);
System\Windows\Forms\ImageListTests.cs (1)
978list.Draw(graphics, pt.X, pt.Y, 0);
System\Windows\Forms\ListViewInsertionMarkTests.cs (1)
617Assert.Equal(2, pPt->Y);
System\Windows\Forms\MonthCalendarTests.cs (1)
4495hitTestInfo.Point.Y.Should().Be(y);
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (2)
59Validate.TextOut(pt.Y.ToString(), new(145, 41, 5, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))), 62Validate.TextOut(nameof(Point.Y), new(25, 42, 6, 14), stateValidators: State.FontFace(Control.DefaultFont.Name))),
System\Windows\Forms\RadioButtonRendererTests.cs (4)
28Point point = new(control.Location.X, control.Location.Y); 59Point point = new(control.Location.X, control.Location.Y); 96Point point = new(control.Location.X, control.Location.Y); 123Point point = new(control.Location.X, control.Location.Y);
System\Windows\Forms\SplitterPanelTests.cs (6)
549Assert.Equal(value.Y, control.Top); 550Assert.Equal(value.Y + 100, control.Bottom); 553Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 571Assert.Equal(value.Y, control.Top); 572Assert.Equal(value.Y + 100, control.Bottom); 575Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\TabPageTests.cs (18)
1907Assert.Equal(value.Y, control.Top); 1908Assert.Equal(value.Y + 100, control.Bottom); 1911Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1929Assert.Equal(value.Y, control.Top); 1930Assert.Equal(value.Y + 100, control.Bottom); 1933Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 1997Assert.Equal(value.Y, control.Top); 1998Assert.Equal(value.Y + 100, control.Bottom); 2001Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2020Assert.Equal(value.Y, control.Top); 2021Assert.Equal(value.Y + 100, control.Bottom); 2024Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2098Assert.Equal(value.Y, control.Top); 2099Assert.Equal(value.Y + 100, control.Bottom); 2102Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 2123Assert.Equal(value.Y, control.Top); 2124Assert.Equal(value.Y + 100, control.Bottom); 2127Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (8)
409Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1); 453Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1);
System\Windows\Forms\ToolStripContentPanelTests.cs (6)
948Assert.Equal(value.Y, control.Top); 949Assert.Equal(value.Y + 100, control.Bottom); 952Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds); 970Assert.Equal(value.Y, control.Top); 971Assert.Equal(value.Y + 100, control.Bottom); 974Assert.Equal(new Rectangle(value.X, value.Y, 200, 100), control.Bounds);
System\Windows\Forms\ToolStripDropDownTests.cs (7)
1934expected.Y = Math.Max(expected.Y, SystemInformation.WorkingArea.Y); 1974Assert.Equal(expected.Y, control.Top); 1975Assert.Equal(expected.Y + 25, control.Bottom); 1978Assert.Equal(new Rectangle(expected.X, expected.Y, 100, 25), control.Bounds); 1996Assert.Equal(expected.Y, control.Top); 1997Assert.Equal(expected.Y + 25, control.Bottom); 2000Assert.Equal(new Rectangle(expected.X, expected.Y, 100, 25), control.Bounds);
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
792position.Y.Should().BeLessThanOrEqualTo(_toolStripTextBox.Height);
System\Windows\Forms\TreeViewTests.cs (24)
4922Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4926Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4937Assert.Same(node1, control.GetNodeAt(pt.X, pt.Y)); 4941Assert.Same(node1, control.GetNodeAt(pt.X, pt.Y)); 4952Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4956Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4973Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 4980Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 5002Assert.Same(node1, control.GetNodeAt(pt.X, pt.Y)); 5009Assert.Same(node1, control.GetNodeAt(pt.X, pt.Y)); 5031Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 5038Assert.Null(control.GetNodeAt(pt.X, pt.Y)); 5270TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5276result = control.HitTest(pt.X, pt.Y); 5289TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5295result = control.HitTest(pt.X, pt.Y); 5308TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5314result = control.HitTest(pt.X, pt.Y); 5333TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5342result = control.HitTest(pt.X, pt.Y); 5366TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5375result = control.HitTest(pt.X, pt.Y); 5399TreeViewHitTestInfo result = control.HitTest(pt.X, pt.Y); 5408result = control.HitTest(pt.X, pt.Y);
System\Windows\Forms\WebBrowserTests.cs (4)
4531yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 4537yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero, true }; 4605yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250 }; 4611yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero };
TextBoxBaseTests.cs (10)
4859Assert.Equal(0, pt.Y); 4920Assert.Equal(0, pt.Y); 6984yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true, true }; 6990yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), expectedResult, false, true }; 7065yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 7071yield return new object[] { Size.Empty, shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), expectedResult, false }; 7830Assert.True(actualPoint.Y >= expectedPoint.Y - 1 || actualPoint.Y <= expectedPoint.Y + 1);
System.Windows.Forms.UI.IntegrationTests (85)
ButtonTests.cs (6)
263(int)Math.Round(65535.0 / verticalResolution * centerOnScreen.Y)); 269.MoveMouseTo(virtualPoint.X, virtualPoint.Y) 298Point virtualPoint = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen.X), (int)Math.Round(65535.0 / verticalResolution * centerOnScreen.Y)); 299Point virtualPoint1 = new((int)Math.Round(65535.0 / horizontalResolution * centerOnScreen1.X), (int)Math.Round(65535.0 / verticalResolution * centerOnScreen1.Y)); 304.MoveMouseTo(virtualPoint.X, virtualPoint.Y) 305.MoveMouseTo(virtualPoint1.X, virtualPoint1.Y)
DataGridViewTests.cs (2)
35inputSimulator => inputSimulator.Mouse.MoveMouseTo(targetPoint.X, targetPoint.Y)); 115inputSimulator => inputSimulator.Mouse.MoveMouseTo(targetPoint.X, targetPoint.Y).Sleep(TimeSpan.FromMilliseconds(1000)));
DesignBehaviorsTests.cs (2)
128inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 130.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y)
DragDropTests.cs (62)
47.MoveMouseTo(targetMousePosition.X - 40, targetMousePosition.Y) 48.MoveMouseTo(targetMousePosition.X, targetMousePosition.Y) 49.MoveMouseTo(targetMousePosition.X + 2, targetMousePosition.Y + 2) 50.MoveMouseTo(targetMousePosition.X + 4, targetMousePosition.Y + 4) 102Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 110.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 112.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 113.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 114.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 115.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 168WaitForExplorer(DragDrop, new Point(dragDropForm.Location.X + dragDropForm.Width, dragDropForm.Location.Y)); 199Y = (startCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2) 204Y = (endCoordinates.Y - vscreen.Top) * DesktopNormalizedMax / vscreen.Height + DesktopNormalizedMax / (vscreen.Height * 2) 258.MoveMouseToPositionOnVirtualDesktop(virtualPointStart.X, virtualPointStart.Y) 260.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X, virtualPointEnd.Y) 261.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 262.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 263.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 264.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 265.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 266.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 267.MoveMouseToPositionOnVirtualDesktop(virtualPointEnd.X, virtualPointEnd.Y) 317Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 325.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 327.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 328.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 329.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 330.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 388.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 390.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 391.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 392.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 393.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 394.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 395.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 396.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 397.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 404.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 406.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 407.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 408.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 409.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 410.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 411.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 412.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 413.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 436inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualPointStart.X, virtualPointStart.Y) 438.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 472inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualToolStripItemCoordinates.X, virtualToolStripItemCoordinates.Y)); 479inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualPointStart.X, virtualPointStart.Y) 481.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 527Point endCoordinates = new(startCoordinates.X + 5, startCoordinates.Y + 5); 535.MoveMouseTo(virtualPointStart.X + 6, virtualPointStart.Y + 6) 537.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 538.MoveMouseTo(virtualPointEnd.X, virtualPointEnd.Y) 539.MoveMouseTo(virtualPointEnd.X + 2, virtualPointEnd.Y + 2) 540.MoveMouseTo(virtualPointEnd.X + 4, virtualPointEnd.Y + 4) 628startPosition.Y, 917((MousePosition.Y - _screenOffset.Y) < form.DesktopBounds.Top) || 918((MousePosition.Y - _screenOffset.Y) > form.DesktopBounds.Bottom))
Infra\ControlTestBase.cs (6)
177(int)Math.Ceiling((65535.0 / (primaryMonitor.Height - 1)) * point.Y)); 182TestOutputHelper.WriteLine($"Moving mouse to ({point.X}, {point.Y})."); 185TestOutputHelper.WriteLine($"Screen resolution of ({primaryMonitor.Width}, {primaryMonitor.Height}) translates mouse to ({virtualPoint.X}, {virtualPoint.Y})."); 187await InputSimulator.SendAsync(window, inputSimulator => inputSimulator.Mouse.MoveMouseTo(virtualPoint.X, virtualPoint.Y)); 197if (actualPoint.X != point.X || actualPoint.Y != point.Y)
Input\MouseSimulator.cs (1)
137return MoveMouseTo(virtualPoint.X, virtualPoint.Y);
ListBoxAccesibleObjectTests.cs (2)
41var result = listBox.AccessibilityObject.HitTest(testPoint.X, testPoint.Y); 57var result = listBox.AccessibilityObject.HitTest(testPoint.X, testPoint.Y);
ListViewTests.cs (1)
325listView.AccessibilityObject.HitTest(point.X, point.Y)!;
PropertyGridTests.cs (3)
233_propertyGrid.ContextMenuDefaultLocation.Y.Should().Be(oldLocation.Y + newLocation.Y);
WinFormsControlsTest (1)
MainForm.cs (1)
296+ (padding * 2) + (overarchingFlowLayoutPanel.Location.Y * 2));