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)
332pt.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)
12613_ptMouseEnteredCell.Y = e.RowIndex; 12636_ptMouseEnteredCell.Y = -2; 15561newCurrentCell.Y += insertionCount; 16119_ptMouseDownCell.Y = hti._row; 16169_ptMouseEnteredCell.X = _ptMouseEnteredCell.Y = -2; 17399_ptCurrentCellCache.Y = -1; 17410_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17418_ptCurrentCellCache.Y = -1; 18819pt.Y += Height; 25847_ptMouseDownCell.Y = -2; 26626_ptAnchorCell.Y = firstVisibleRowIndex; 26631_ptAnchorCell.Y = -1; 26792_ptCurrentCell.Y = rowIndex; 26926_ptCurrentCell.Y = rowIndex; 26936_ptAnchorCell.Y = rowIndex; 26998_ptAnchorCell.Y = rowIndex; 27086_ptCurrentCell.Y = -1; 27093_ptAnchorCell.Y = -1; 28224_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28355_ptCurrentCellCache.Y = rowIndex2; 28359_ptCurrentCellCache.Y = rowIndex1; 29204_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)
1427location.Y += rect.Y; 1430location.Y -= size.Height; 1435location.Y += rect.Height + 1; 1664pt.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)
380noMansLand.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; 3945p.Y = (ownerRect.top + ownerRect.bottom - s.Height) / 2; 3948p.Y = screenRect.Y; 3952p.Y = screenRect.Y + screenRect.Height - s.Height; 3990p.Y = Math.Max(screenRect.Y, screenRect.Y + (screenRect.Height - Height) / 2); 6872mmi->ptMinTrackSize.Y = minTrack.Height; 6889mmi->ptMaxTrackSize.Y = int.MaxValue; 6904mmi->ptMaxTrackSize.Y = Math.Max(maxTrack.Height, minTrackWindowSize.Height); 6910mmi->ptMaxPosition.Y = maximizedBounds.Y; 6912mmi->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; 777newPosition.Y += _lastSnapOffset.Y; 791newPosition.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)
148offset.Y = _lastRectangle.Top - mouseLoc.Y; 154offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 170offset.Y = _lastRectangle.Top - mouseLoc.Y; 176offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 219offset.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)
1312_mouseDragEnd.Y = e.Y; 1826_whiteSpace.Y = _whiteSpace.Y * 2 + 3; 1866newLoc.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; 1028position.Y = rows.Length; 1037position.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)
379string newMessage = string.Format(SR.SerializationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, se.Message); 380XmlException xml = new(newMessage, se, pt.Y, pt.X); 386string newMessage = string.Format(SR.InvocationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, tie.InnerException?.Message); 387XmlException xml = new(newMessage, tie.InnerException, pt.Y, pt.X); 403XmlException 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)
1564if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 2490set => SetBounds(value.X, value.Y, _width, _height, BoundsSpecified.Location); 7985cliprect.Offset(-offs.X, -offs.Y); 8784viewportOrg.Y, 8786viewportOrg.Y + Height); 8812clientOffset = 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)
1594OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptlc.X, Ptlc.Y, 0)); 1611OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, Ptmc.X, Ptmc.Y, 0)); 1628OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Ptrc.X, Ptrc.Y, 0)); 1642OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptl.X, Ptl.Y, 0)); 1687OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, P.X, P.Y, 0)); 1704OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Pt.X, Pt.Y, 0)); 1724OnMouseUp(new MouseEventArgs(MouseButtons.Right, 1, ptRBtnUp.X, ptRBtnUp.Y, 0)); 1746OnMouseMove(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); 2685((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = _ptCurrentCell.Y; 2722InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3043Debug.Assert(_ptCurrentCell.Y != -1); 3104_ptCurrentCell.Y, 3129InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3208if (currentCellDirty || _ptCurrentCell.Y == -1 || _ptCurrentCell.X == -1) 3236if (_ptCurrentCell.Y > -1) 3238InvalidateRowPrivate(_ptCurrentCell.Y); 3242DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 3259if (discardNewRow && _ptCurrentCell.Y == NewRowIndex - 1) 3267if (!IsCurrentRowDirty && _ptCurrentCell.Y == NewRowIndex - 1 && _dataGridViewState1[State1_NewRowCreatedByEditing]) 3353if ((DataConnection.CurrencyManager?.Count ?? 0) <= _ptCurrentCell.Y) 3768OnCellLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3778OnRowLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3789if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 3791InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 3804if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3816_ptCurrentCell.Y, 3828OnCellEnter(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3839_ptCurrentCell.Y, 3854OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3881if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3891_ptCurrentCell.Y, 3923_ptCurrentCell.Y, 3962OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 4029int rowIndex = _ptCurrentCell.Y; 4073fireRowLeave: _ptCurrentCell.Y != rowIndex, 4074fireRowEnter: _ptCurrentCell.Y != rowIndex, 4083if (_ptCurrentCell.Y != rowIndex && _ptCurrentCell.Y != -1) 4087int rowIndexTmp = _ptCurrentCell.Y; 4138forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 5477Debug.Assert(_ptCurrentCell.Y == NewRowIndex); 5739int adjustedY = _editingPanel.Location.Y + e.Y; 5743adjustedY += EditingControl.Location.Y; 6170int curRowIndex = _ptCurrentCell.Y; 6215if (curRowIndex != _ptCurrentCell.Y || curColIndex != _ptCurrentCell.X) 6239InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 6266InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 8597if (_ptAnchorCell.Y != -1 8598&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) != 0 8635if (_ptAnchorCell.Y != -1 8636&& ((Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0 8817if (((_ptAnchorCell.Y != -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0) 8818|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 9633HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 9634int mouseX = ptMouse.X, mouseY = ptMouse.Y; 9656ptMouse.Y - yOffset - (yOffset / Math.Abs(yOffset))) 9686_uneditedFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9697dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9708_ptCurrentCell.Y, 9727object? initialFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9732dataGridViewCell.InitializeEditingControl(_ptCurrentCell.Y, initialFormattedValue, dataGridViewCellStyle); 9740_ptCurrentCell.Y, 10391&& (includeNewRow || !AllowUserToAddRowsInternal || firstDisplayedCellAddress.Y != Rows.Count - 1)) 10395firstDisplayedCellAddress.Y, 11902HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 11910Debug.Assert(_ptMouseDownCell.Y == hti._row); 11974BeginRowResize(ptGridCoord.Y, hti._mouseBarOffset, rowIndex); 12043BeginColumnHeadersResize(ptGridCoord.Y, hti._mouseBarOffset); 12068if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row)) 12073forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row, 12074forCurrentRowChange: _ptCurrentCell.Y != hti._row)) 12156int oldEdgeRowIndex = _ptCurrentCell.Y; 12166_ptAnchorCell.Y, 12346int oldEdgeRowIndex = _ptCurrentCell.Y; 12356_ptAnchorCell.Y, 12410&& _ptAnchorCell.Y > -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 12457if (hti._row >= _ptAnchorCell.Y) 12459SelectRowRange(_ptAnchorCell.Y, hti._row, true); 12463SelectRowRange(hti._row, _ptAnchorCell.Y, true); 12552int oldEdgeRowIndex = _ptCurrentCell.Y; 12562_ptAnchorCell.Y, 12679&& _ptMouseDownCell.Y == -1 12685HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 12701|| Math.Abs(_ptMouseDownGridCoord.Y - ptGridCoord.Y) >= s_dragSize.Height) 12766int oldEdgeRowIndex = _ptCurrentCell.Y; 12767if ((hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12786_ptAnchorCell.Y, 12790if (hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12825&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 13704int oldCurrentCellY = _ptCurrentCell.Y; 13710fireRowLeave: rowIndex != _ptCurrentCell.Y, 13711fireRowEnter: rowIndex != _ptCurrentCell.Y, 13869_ptCurrentCell.Y, 14129if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X && !CommitEditForOperation(hti._col, _ptCurrentCell.Y, true)) 14213if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(hti._col)) 14220_ptCurrentCell.Y, 14446&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14547&& _ptMouseDownCell.Y == rowIndex 14549|| _ptMouseDownCell.Y == -1 14550|| (columnIndex == _ptCurrentCell.X && rowIndex == _ptCurrentCell.Y)))) 14581InvalidateCellPrivate(-1, _ptCurrentCell.Y); 14584if (IsCurrentCellDirty && NewRowIndex == _ptCurrentCell.Y) 14786if (elementState == DataGridViewElementStates.Visible && _ptCurrentCell.Y == rowIndex) 14794Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y); 14808if (_ptCurrentCell.Y == rowIndex 14847&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 15025_ptCurrentCell.Y, 15033OnCellEnter(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15058InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15067InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15192InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15238ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 15277newCurrentCell.Y, 15310if (lastInsertion && newCurrentCell.Y != -1) 15315newCurrentCell.Y, 15350if (newCurrentCell.Y != -1) 15355newCurrentCell.Y, 15414_ptCurrentCell.Y); 15531if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15533newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 15559if (newCurrentCell.Y != -1) 15614if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15616newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 15683if (dataGridViewCell.KeyDownUnsharesRowInternal(e, _ptCurrentCell.Y)) 15686_ = Rows[_ptCurrentCell.Y]; 15687CurrentCellInternal.OnKeyDownInternal(e, _ptCurrentCell.Y); 15691dataGridViewCell.OnKeyDownInternal(e, _ptCurrentCell.Y); 15742if (dataGridViewCell.KeyPressUnsharesRowInternal(e, _ptCurrentCell.Y)) 15745_ = Rows[_ptCurrentCell.Y]; 15746CurrentCellInternal.OnKeyPressInternal(e, _ptCurrentCell.Y); 15750dataGridViewCell.OnKeyPressInternal(e, _ptCurrentCell.Y); 15776if (dataGridViewCell.KeyUpUnsharesRowInternal(e, _ptCurrentCell.Y)) 15779_ = Rows[_ptCurrentCell.Y]; 15780CurrentCellInternal.OnKeyUpInternal(e, _ptCurrentCell.Y); 15784dataGridViewCell.OnKeyUpInternal(e, _ptCurrentCell.Y); 15818OnCellLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15824OnRowLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15832if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 15834InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15850InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15874&& _ptMouseDownCell.Y == hti._row 15877|| _ptMouseDownCell.Y == -1 15878|| (_ptMouseDownCell.X == _ptCurrentCell.X && _ptMouseDownCell.Y == _ptCurrentCell.Y))) 15962if (_ptMouseDownCell.X == hti._col && _ptMouseDownCell.Y == hti._row) 16108Debug.Assert(_ptMouseDownCell.Y != -2); 16163&& _ptMouseEnteredCell.Y >= -1 && _ptMouseEnteredCell.Y < Rows.Count) 16165OnCellMouseLeave(new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y)); 16375&& _ptMouseDownCell.Y == hti._row 16864&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 16902newCurrentCell.Y, 16948if (newCurrentCell.Y != -1) 16953newCurrentCell.Y, 17067newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17254if (_ptCurrentCell.Y != -1 && rowIndexDeleted <= _ptCurrentCell.Y) 17257if (rowIndexDeleted == _ptCurrentCell.Y) 17278Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y); 17279newY = _ptCurrentCell.Y - 1; 17283if (rowIndexDeleted == _ptCurrentCell.Y) 17393if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 17395SetCurrentCellAddressCore(_ptCurrentCellCache.X, _ptCurrentCellCache.Y, false, false, false); 17405if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17410_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17951if (dataGridViewColumn is not null && hti._row != _ptCurrentCell.Y) 17954int oldCurrentCellY = _ptCurrentCell.Y; 17961fireRowLeave: hti._row != _ptCurrentCell.Y, 17962fireRowEnter: hti._row != _ptCurrentCell.Y, 18050&& _ptAnchorCell.Y > -1 18051&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 18107if (hti._row >= _ptAnchorCell.Y) 18109SelectRowRange(_ptAnchorCell.Y, hti._row, true); 18113SelectRowRange(hti._row, _ptAnchorCell.Y, true); 18125if (hti._row != _ptCurrentCell.Y) 18143else if (_ptCurrentCell.Y != -1) 18148_ptCurrentCell.Y, 18405if (_ptCurrentCell.Y != -1 18406&& hti._row != _ptCurrentCell.Y 18484if (_ptCurrentCell.Y != -1 && hti._row != _ptCurrentCell.Y) 18681if (e.StateChanged == DataGridViewElementStates.ReadOnly && rowIndex == _ptCurrentCell.Y && !_dataGridViewOper[OperationInReadOnlyChange]) 18701if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 18830if (pt.Y < 0 && step < 0) 18832Invalidate(new Rectangle(new Point(0, -pt.Y), 18837if (pt.Y > rect.Bottom && step > 0) 18840new Size(ClientSize.Width, ClientSize.Height - (pt.Y - rect.Bottom) - step))); 18987_ptCurrentCell.Y, 19068if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19080OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19083if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19086int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19804Debug.Assert(dataGridViewCell.RowIndex == _ptCurrentCell.Y || dataGridViewCell.RowIndex == -1); 19823Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19824Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19838if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19864bool isFirstDisplayedRow = FirstDisplayedRowIndex == _ptCurrentCell.Y; 20160if (_ptCurrentCell.Y != -1) 20162nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20209Debug.Assert(_ptAnchorCell.Y >= 0); 20211int oldEdgeRowIndex = _ptCurrentCell.Y; 20222_ptAnchorCell.Y, 20341int oldEdgeRowIndex = _ptCurrentCell.Y; 20352_ptAnchorCell.Y, 20458if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20465Debug.Assert(_ptAnchorCell.Y >= 0); 20466SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 20486SetSelectedRowCore(_ptCurrentCell.Y, false); 20589if (nextVisibleRowIndex >= _ptAnchorCell.Y) 20591SelectRowRange(_ptAnchorCell.Y, nextVisibleRowIndex, true); 20595SelectRowRange(nextVisibleRowIndex, _ptAnchorCell.Y, true); 20694Debug.Assert(_ptAnchorCell.Y >= 0); 20695if (_ptAnchorCell.Y == -1 || _ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20701if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20704SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 20709int oldEdgeRowIndex = _ptCurrentCell.Y; 20714_ptAnchorCell.Y, 20732if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20738if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20740SetSelectedRowCore(_ptCurrentCell.Y, false); 20745SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 20784if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20790if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20844if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20850if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20855if (_ptAnchorCell.Y == -1) 20861if (nextVisibleRowIndex >= _ptAnchorCell.Y) 20863SelectRowRange(_ptAnchorCell.Y, nextVisibleRowIndex, true); 20867SelectRowRange(nextVisibleRowIndex, _ptAnchorCell.Y, true); 20880int oldEdgeRowIndex = _ptCurrentCell.Y; 20891_ptAnchorCell.Y, 20942if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20948if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21109int oldEdgeRowIndex = _ptCurrentCell.Y; 21114_ptAnchorCell.Y, 21157if (_ptCurrentCell.Y > -1 21158&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21161SelectRowRange(_ptCurrentCell.Y, lastVisibleRowIndex, select: true); 21166int oldEdgeRowIndex = _ptCurrentCell.Y; 21171_ptAnchorCell.Y, 21178if (_ptCurrentCell.Y > -1 21179&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21195if (_ptCurrentCell.Y > -1 21196&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21292int oldEdgeRowIndex = _ptCurrentCell.Y; 21302_ptAnchorCell.Y, 21364if (MultiSelect && _ptCurrentCell.Y >= 0) 21366if (_ptAnchorCell.Y == -1) 21371SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 21459int rowIndex = _ptCurrentCell.Y; 21503Debug.Assert(_ptCurrentCell.Y != -1); 21506|| IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21510&& !IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21513bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21583int oldEdgeRowIndex = _ptCurrentCell.Y; 21588_ptAnchorCell.Y, 21631if (_ptCurrentCell.Y > -1 21632&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21635SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, select: true); 21640int oldEdgeRowIndex = _ptCurrentCell.Y; 21645_ptAnchorCell.Y, 21652if (_ptCurrentCell.Y > -1 21653&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21669if (_ptCurrentCell.Y > -1 21670&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21771int oldEdgeRowIndex = _ptCurrentCell.Y; 21781_ptAnchorCell.Y, 21885&& !IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 21902bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22041if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22130if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22135if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22144int oldEdgeRowIndex = _ptCurrentCell.Y; 22154_ptAnchorCell.Y, 22161SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22164success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22191if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22196if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22202SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22203success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22241if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22246if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22273success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22300if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22305if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22312success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22350if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22387int oldEdgeRowIndex = _ptCurrentCell.Y; 22397_ptAnchorCell.Y, 22404SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22408success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22435if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22453SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22456success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22492if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22497if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22502success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22551if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22558int oldEdgeRowIndex = _ptCurrentCell.Y; 22568_ptAnchorCell.Y, 22573_ptCurrentCell.Y, 22581if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22586if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22592SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22595_ptCurrentCell.Y, 22626if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, forCurrentCellChange: true)) 22631if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22637SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, selected: true); 22640_ptCurrentCell.Y, 22676if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22681if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22689success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22694if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22706success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22729if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22734if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22741success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22769if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22788int oldEdgeRowIndex = _ptCurrentCell.Y; 22793_ptAnchorCell.Y, 22798success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22803if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22820SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22821SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22824success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22847if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22865SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22868success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22892if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22897if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22902success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22931if (_ptCurrentCell.Y == -1) 22941nextScreenVisibleRowIndex = _ptCurrentCell.Y; 22957_ptCurrentCell.Y, 23033Debug.Assert(_ptAnchorCell.Y >= 0); 23035int oldEdgeRowIndex = _ptCurrentCell.Y; 23036if (_ptAnchorCell.Y == -1) 23045_ptAnchorCell.Y, 23073Debug.Assert(_ptAnchorCell.Y >= 0); 23074if (_ptAnchorCell.Y == -1) 23079if (_ptAnchorCell.Y < nextScreenVisibleRowIndex) 23081SelectRowRange(_ptAnchorCell.Y, nextScreenVisibleRowIndex, true); 23085SelectRowRange(nextScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23109Debug.Assert(_ptAnchorCell.Y >= 0); 23110if (_ptAnchorCell.Y == -1) 23115if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23118if (_ptAnchorCell.Y < nextScreenVisibleRowIndex) 23120SelectRowRange(_ptAnchorCell.Y, nextScreenVisibleRowIndex, true); 23124SelectRowRange(nextScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23130int oldEdgeRowIndex = _ptCurrentCell.Y; 23135_ptAnchorCell.Y, 23142if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23192if (_ptCurrentCell.Y == -1) 23202previousScreenVisibleRowIndex = _ptCurrentCell.Y; 23292Debug.Assert(_ptAnchorCell.Y >= 0); 23294int oldEdgeRowIndex = _ptCurrentCell.Y; 23304_ptAnchorCell.Y, 23331Debug.Assert(_ptAnchorCell.Y >= 0); 23332if (_ptAnchorCell.Y == -1) 23337if (_ptAnchorCell.Y < previousScreenVisibleRowIndex) 23339SelectRowRange(_ptAnchorCell.Y, previousScreenVisibleRowIndex, true); 23343SelectRowRange(previousScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23367Debug.Assert(_ptAnchorCell.Y >= 0); 23368if (_ptAnchorCell.Y == -1) 23373if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23376if (_ptAnchorCell.Y < previousScreenVisibleRowIndex) 23378SelectRowRange(_ptAnchorCell.Y, previousScreenVisibleRowIndex, true); 23382SelectRowRange(previousScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23388int oldEdgeRowIndex = _ptCurrentCell.Y; 23393_ptAnchorCell.Y, 23400if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23509if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23514if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23522int oldEdgeRowIndex = _ptCurrentCell.Y; 23532_ptAnchorCell.Y, 23539SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23542success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23569if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23574if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23580SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23581success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23619if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23624if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23651success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23678if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23683if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23690success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23728if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23733if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23772int oldEdgeRowIndex = _ptCurrentCell.Y; 23777_ptAnchorCell.Y, 23784SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23788success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23815if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23833SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23836success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23872if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23877if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23882success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23929if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23934if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23948int oldEdgeRowIndex = _ptCurrentCell.Y; 23953_ptAnchorCell.Y, 23956success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 23962SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23963success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23986if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 23991if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 23997SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 23998success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24024if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24029if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24044success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24051success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24074if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24079if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24086success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24112if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24117if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24138int oldEdgeRowIndex = _ptCurrentCell.Y; 24143_ptAnchorCell.Y, 24148success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24160SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24161SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24164success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24187if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24192if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24205SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24208success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24232if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24237if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24242success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24305if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.Y) 24317if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24319Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y)); 24320SetSelectedRowCore(_ptCurrentCell.Y, true); 24542if (_ptCurrentCell.Y != -1) 24544previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 24584Debug.Assert(_ptAnchorCell.Y >= 0); 24586int oldEdgeRowIndex = _ptCurrentCell.Y; 24591_ptAnchorCell.Y, 24681Debug.Assert(_ptAnchorCell.Y >= 0); 24682if (_ptAnchorCell.Y == -1) 24688int oldEdgeRowIndex = _ptCurrentCell.Y; 24693_ptAnchorCell.Y, 24783Debug.Assert(_ptAnchorCell.Y >= 0); 24784SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, true); 24799SetSelectedRowCore(_ptCurrentCell.Y, false); 24873if (_ptAnchorCell.Y == -1) 24878if (_ptAnchorCell.Y >= previousVisibleRowIndex) 24880SelectRowRange(previousVisibleRowIndex, _ptAnchorCell.Y, true); 24884SelectRowRange(_ptAnchorCell.Y, previousVisibleRowIndex, true); 24966Debug.Assert(_ptAnchorCell.Y >= 0); 24967if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 24970SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, true); 24975int oldEdgeRowIndex = _ptCurrentCell.Y; 24980_ptAnchorCell.Y, 24999if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25001SetSelectedRowCore(_ptCurrentCell.Y, false); 25006SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25040if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25088if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25093if (_ptAnchorCell.Y == -1) 25098if (_ptAnchorCell.Y >= previousVisibleRowIndex) 25100SelectRowRange(previousVisibleRowIndex, _ptAnchorCell.Y, true); 25104SelectRowRange(_ptAnchorCell.Y, previousVisibleRowIndex, true); 25115int oldEdgeRowIndex = _ptCurrentCell.Y; 25116if (_ptAnchorCell.Y == -1) 25125_ptAnchorCell.Y, 25170if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25276if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 25280bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25293object? nullValue = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: false).NullValue; 25311InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25352_ptCurrentCell.Y, 25366dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25369return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, dgvcpe.Value); 25391dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25394return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, val); 25475Debug.Assert(_ptCurrentCell.Y != -1); 25477DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 26014forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26015forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26032forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26033forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26046forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26047forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26211if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26274forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26275forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26303forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26304forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26353if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26786if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 26807int oldCurrentCellY = _ptCurrentCell.Y; 26853Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 26947OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 26956if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 26962InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 26963if (RowHeadersVisible && oldCurrentCellY != _ptCurrentCell.Y) 26965InvalidateCellPrivate(-1, _ptCurrentCell.Y); 26989AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27017int oldCurrentCellY = _ptCurrentCell.Y; 27059Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 28224_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28293if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 28297_ptCurrentCellCache.Y, 28353if (rowIndex1 == _ptCurrentCellCache.Y) 28357else if (rowIndex2 == _ptCurrentCellCache.Y) 28511if (_ptCurrentCell.Y != -1) 28513nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28534targetRowIndex = _ptCurrentCell.Y; 28606if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28672if (_ptCurrentCell.Y != -1) 28674previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28703targetRowIndex = _ptCurrentCell.Y; 28775if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 29101PositionEditingControl(rowIndex == -1 || _ptCurrentCell.Y != rowIndex, true, false); 29158HitTestInfo htiToUse = hti ?? HitTest(ptMouse.X, ptMouse.Y); 29164if (_ptMouseEnteredCell.X != htiToUse._col || _ptMouseEnteredCell.Y != htiToUse._row) 29169&& _ptMouseEnteredCell.Y >= -1 29170&& _ptMouseEnteredCell.Y < Rows.Count) 29172dgvce = new DataGridViewCellEventArgs(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29196&& _ptMouseEnteredCell.Y >= -1 29197&& _ptMouseEnteredCell.Y < Rows.Count) 29199DataGridViewCellEventArgs dgvce = new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29868HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 29869int mouseX = ptMouse.X, mouseY = ptMouse.Y; 29882hti = HitTest(mouseX, ptMouse.Y - yOffset - normOffset); 29891? HitTest(ptMouse.X - xOffset - (xOffset / Math.Abs(xOffset)), ptMouse.Y - yOffset - normOffset) 29892: HitTest(mouseX, ptMouse.Y - yOffset - normOffset); 29975HitTestInfo 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 && 1443else 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)
3222return FindNearestItem(dir, point.X, point.Y); 3713public ListViewHitTestInfo HitTest(Point point) => HitTest(point.X, point.Y); 4388item = GetItemAt(pos.X, pos.Y); 5161int scrollY = GetItemPosition(toLVItem).Y - GetItemPosition(fromLVItem).Y; 6004AccessibleObject? accessibilityObject = AccessibilityObject.HitTest(screenPoint.X, screenPoint.Y); 6730OnMouseClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 6735OnMouseUp(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)
457return new Point(point.X + (rect.Width / 2), point.Y + (rect.Height / 2)); 609if (pt.Y > propertyGridViewBottom) 614if (pt.Y + rect.Height > propertyGridViewBottom) 616rect.Height = propertyGridViewBottom - pt.Y; 619return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height); 678g.TranslateTransform(newOrigin.X, newOrigin.Y); 679r.Offset(-newOrigin.X, -newOrigin.Y); 1111clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1166clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1428if (rectScreen.Y + rectScreen.Height < (size.Height + location.Y + EditTextBox.Height)) 1454_dropDownHolder.SetBounds(location.X, location.Y, size.Width, size.Height); 1664pt.Y = (y - _location.Y) / (1 + RowHeight); 1905rect.Y = row * (RowHeight + 1) + 1 + _location.Y; 2607Math.Abs(screenPoint.Y - _rowSelectPos.Y) < SystemInformation.DoubleClickSize.Height) 2991GridEntry? gridEntry = GetGridEntryFromRow(pos.Y); 2996Rectangle r = GetRectangle(pos.Y, RowLabel); 3047rowMoveCurrent = point.Y; 3070Rectangle itemRect = GetRectangle(point.Y, point.X); 3290startRow = Math.Max(0, startPosition.Y); 3295endRow = endPosition.Y; 3317g.DrawLine(splitterPen, _labelWidth, location.Y, _labelWidth, visibleCount * (RowHeight + 1) + location.Y); 3335currentRowHeight = i * (RowHeight + 1) + location.Y; 3357currentRowHeight = visibleCount * (RowHeight + 1) + location.Y; 5257mouseLoc = FindPosition(mouseLoc.X, mouseLoc.Y); 5264GridEntry? curEntry = GetGridEntryFromRow(mouseLoc.Y); 5272Rectangle itemRect = GetRectangle(mouseLoc.Y, mouseLoc.X); 5278tipPt = 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)
2218Point 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)
589int 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); 3048OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), button, 1, pos.X, pos.Y)); 3049OnClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3050OnMouseClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3078OnMouseUp(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3323OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), _downButton, 1, point.X, point.Y)); 3335OnNodeMouseDoubleClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), _downButton, 2, point.X, point.Y));
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
904return 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)
178PInvoke.SetViewportOrgEx(hdc, originalOrigin.X + _windowBounds.Width - 1, originalOrigin.Y, lppt: null);
System\Windows\Forms\Form.cs (5)
927SetDesktopLocation(value.X, value.Y); 1368Location.Y, 3946if (p.Y < screenRect.Y) 3950else if (p.Y + s.Height > screenRect.Y + screenRect.Height) 7002point.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)
432transform.Translate(scrollOffset.X, scrollOffset.Y); 1834PInvoke.MoveToEx(desktopDC, start.X, start.Y, lppt: null); 1835PInvoke.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); 740mouseLoc.Y - _initialMouseLoc.Y + _dragComponents[_primaryComponentIndex].originalControlLocation.Y); 744Rectangle newRect = new(newPosition.X, newPosition.Y, 777newPosition.Y += _lastSnapOffset.Y; 789mouseLoc.Y - _initialMouseLoc.Y + _originalDragImageLocation.Y); 791newPosition.Y += _lastSnapOffset.Y; 806invalidDragRegion.Translate(mouseLoc.X - _initialMouseLoc.X + _lastSnapOffset.X, mouseLoc.Y - _initialMouseLoc.Y + _lastSnapOffset.Y); 949dragControl.Location.Y - primaryControl.Location.Y); 1034_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)
148offset.Y = _lastRectangle.Top - mouseLoc.Y; 154offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 170offset.Y = _lastRectangle.Top - mouseLoc.Y; 176offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 219offset.Y = _lastRectangle.Top - mouseLoc.Y; 259ToolboxSnapDragDropEventArgs se = CreateToolboxSnapArgs(e, new Point(e.X - screenOffset.X, e.Y - screenOffset.Y)); 311mouseLoc.Y - DesignerUtils.s_boxImageSize / 2, 321newRectangle.Offset(_lastOffset.X, _lastOffset.Y); 346Rectangle 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); 994return new Point(loc.X - autoScrollLoc.X, loc.Y - autoScrollLoc.Y); 1206_mouseDragWorkspace.Y = Math.Min(start.Y, end.Y); 1208_mouseDragWorkspace.Height = Math.Abs(end.Y - start.Y); 1341Y = Math.Min(_mouseDragStart.Y, e.Y), 1343Height = Math.Abs(e.Y - _mouseDragStart.Y) 1575location = new Point(location.X + autoScrollLoc.X, location.Y + autoScrollLoc.Y); 1619if (location.X == -1 && location.Y == -1) 1826_whiteSpace.Y = _whiteSpace.Y * 2 + 3; 1832Point newLoc = new(display.X + _whiteSpace.X, display.Y + _whiteSpace.Y); 1844newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 1866newLoc.Y += bounds.Height + _whiteSpace.Y; 1879newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 2197Math.Abs(_mouseDragLast.Y - newPt.Y) < minDrag.Height)) 2216if (_tray._selectionUISvc is not null && _tray._selectionUISvc.BeginDrag(SelectionRules.Visible | SelectionRules.Moveable, _mouseDragLast.X, _mouseDragLast.Y)) 2257mcs.ShowContextMenu(MenuCommands.TraySelectionMenu, location.X, location.Y); 2539if (location.X == -1 && location.Y == -1) 2553pt.Offset(pt1.X, pt1.Y); 2556pt.Offset(Location.X, Location.Y); 2778if (tcLoc1.X == tcLoc2.X && tcLoc1.Y == tcLoc2.Y) 2784if (tcLoc1.Y + height <= tcLoc2.Y) 2790if (tcLoc2.Y + height <= tcLoc1.Y)
System\Windows\Forms\Design\ControlCommandSet.cs (5)
501lines.Add(new SnapLine(SnapLineType.Bottom, pt.Y + primaryControl.Height - 1)); 502lines.Add(new SnapLine(SnapLineType.Horizontal, pt.Y + primaryControl.Height + primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always)); 644primaryControlsize += new Size(snappedOffset.X, snappedOffset.Y); 656moveOffsetY = snappedOffset.Y; 717Rectangle 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, 1823Point location = new(baseVar.X, baseVar.Y); 1825_statusCommandUI?.SetStatusInformation(new Rectangle(location.X, location.Y, offset.Width, offset.Height)); 1921_mouseDragOffset.Y = _mouseDragBase.Y; 1923_mouseDragOffset.Height = y - _mouseDragBase.Y; 1939_mouseDragBase.Y - _adornerWindowToScreenOffset.Y, 1940x - _mouseDragBase.X, y - _mouseDragBase.Y); 1943_mouseDragOffset.Height += offset.Y; 1976_mouseDragOffset.Y - _adornerWindowToScreenOffset.Y, 1990oldFrameRect.Y -= _adornerWindowToScreenOffset.Y; 2016_statusCommandUI?.SetStatusInformation(new Rectangle(offset.X, offset.Y, _mouseDragOffset.Width, _mouseDragOffset.Height)); 2191newLoc = new Point(controlLoc.X - parentLoc.X, controlLoc.Y - parentLoc.Y); 2196newLoc = 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)
250if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 255if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 260if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 261&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 269if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 290Debug.Assert(!(pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y), "Should be handled by top right check"); 291if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 296if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 297&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 305if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 395if (pt.Y < _outerRect.Y || pt.Y > _outerRect.Y + _outerRect.Height) 402&& pt.Y > _innerRect.Y 403&& 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)); 1026if (pos.Y >= bounds.Bottom) 1030else if (pos.Y > bounds.Y) 1035if (pos.Y <= offset + rows[i]) 1270if (dropPoint.Y < 0 || dropPoint.Y >= rows.Length || dropPoint.X < 0 || dropPoint.X >= columns.Length) 1277Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(dropPoint.X, dropPoint.Y); 1297_curRow = cell.Y;
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1866if (offset.Y <= parentToolStrip.Items[0].Bounds.Y)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (3)
569if (dragBox != Rectangle.Empty && !dragBox.Contains(mouseLoc.X, mouseLoc.Y)) 982parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize); 1005ownerItemDesigner._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)
1376dropDownItem.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)
171cursorPoint.Y.Should().BeLessThanOrEqualTo(SystemInformation.VirtualScreen.Bottom); 172cursorPoint.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));