151 writes to Y
System.Drawing.Primitives (1)
System\Drawing\Point.cs (1)
156Y += dy;
System.Windows.Forms (94)
System\Resources\ResXResourceReader.cs (1)
329pt.Y = lineInfo.LineNumber;
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
290clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 291clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (3)
284s_logPixels.Y = PInvokeCore.GetDeviceCaps(dc, GET_DEVICE_CAPS_INDEX.LOGPIXELSY); 772Y = (LogPixels.Y * y + HiMetricPerInch / 2) / HiMetricPerInch 1351Y = (HiMetricPerInch * y + (LogPixels.Y >> 1)) / LogPixels.Y
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
363clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 364clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
2345Y = Rows.GetFirstRow(DataGridViewElementStates.Visible | DataGridViewElementStates.Frozen) 2352ptFirstDisplayedCellAddress.Y = DisplayedBandsInfo.FirstDisplayedScrollingRow;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (22)
12669_ptMouseEnteredCell.Y = e.RowIndex; 12692_ptMouseEnteredCell.Y = -2; 15623newCurrentCell.Y += insertionCount; 16181_ptMouseDownCell.Y = hti._row; 16231_ptMouseEnteredCell.X = _ptMouseEnteredCell.Y = -2; 17461_ptCurrentCellCache.Y = -1; 17472_ptCurrentCellCache.Y = _ptCurrentCell.Y; 17480_ptCurrentCellCache.Y = -1; 18881pt.Y += Height; 25917_ptMouseDownCell.Y = -2; 26696_ptAnchorCell.Y = firstVisibleRowIndex; 26701_ptAnchorCell.Y = -1; 26862_ptCurrentCell.Y = rowIndex; 26996_ptCurrentCell.Y = rowIndex; 27006_ptAnchorCell.Y = rowIndex; 27068_ptAnchorCell.Y = rowIndex; 27156_ptCurrentCell.Y = -1; 27163_ptAnchorCell.Y = -1; 28294_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28425_ptCurrentCellCache.Y = rowIndex2; 28429_ptCurrentCellCache.Y = rowIndex1; 29274_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)
1456location.Y += rect.Y; 1459location.Y -= size.Height; 1464location.Y += rect.Height + 1; 1693pt.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)
385noMansLand.Y += ClientSize.Height + 1;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
4057newLocation.Y -= delta; 4513cursorLocation.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)
3454toPoint.Y += currentToolStripItemLocation.Y; 3466fromPoint.Y += currentToolStripItemLocation.Y; 3481fromPoint.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)
924loc.Y -= screen.Y; 3930p.Y = (ownerRect.top + ownerRect.bottom - s.Height) / 2; 3933p.Y = screenRect.Y; 3937p.Y = screenRect.Y + screenRect.Height - s.Height; 3975p.Y = Math.Max(screenRect.Y, screenRect.Y + (screenRect.Height - Height) / 2); 6952mmi->ptMinTrackSize.Y = minTrack.Height; 6969mmi->ptMaxTrackSize.Y = int.MaxValue; 6984mmi->ptMaxTrackSize.Y = Math.Max(maxTrack.Height, minTrackWindowSize.Height); 6990mmi->ptMaxPosition.Y = maximizedBounds.Y; 6992mmi->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)
252wp.ptMinPosition.Y -= yDelta; 257wp.ptMinPosition.Y = 0; 261wp.ptMinPosition.Y = -2;
System\Windows\Forms\Printing\PrintPreviewControl.cs (7)
641_position.Y = _vScrollBar.Value; 650offset.Y -= Position.Y; 665lastImageSize.Y = maxImageHeight * row; 955locPos.Y = pos; 989locPos.Y = pos; 1033locPos.Y = pos; 1053locPos.Y = pos;
System\Windows\Forms\ToolTip\ToolTip.cs (2)
1338p.Y = visibleRect.top + visibleRect.Height / 2; 1944moveToLocation.Y = screen.WorkingArea.Bottom - tipSize.Height;
System.Windows.Forms.Design (56)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (6)
349editorLocation.Y += editorBounds.Y; 352editorLocation.Y -= dropDownSize.Height + 1; 356editorLocation.Y += editorBounds.Height; 373editorLocation.Y += editorBounds.Y; 376editorLocation.Y -= dropDownSize.Height + 1; 380editorLocation.Y += editorBounds.Height;
System\Drawing\Design\ColorEditor.ColorPalette.cs (4)
291SetFocus(_focus with { Y = _focus.Y - 1 }); 294SetFocus(_focus with { Y = _focus.Y + 1 }); 446newFocus.Y = 0; 456newFocus.Y = CellsDown - 1;
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
156topRight.Y = newRect.Top; 160topRight.Y -= (GlyphImageOpened.Height - CONTROLOVERLAP_Y);
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
716offset.Y = FindSmallestValidDistance(_horizontalSnapLines, _horizontalDistances, minRange, maxRange, directionOffset.Y); 723offset.Y *= -1;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (4)
160offset.Y = _parentGridSize.Height - yDelta; 164offset.Y = -yDelta; 771newPosition.Y += _lastSnapOffset.Y; 785newPosition.Y += _lastSnapOffset.Y;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
276_parentLocation.Y -= control.Location.Y; 611mouseLoc.Y += _lastSnapOffset.Y;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (5)
145offset.Y = _lastRectangle.Top - mouseLoc.Y; 151offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 167offset.Y = _lastRectangle.Top - mouseLoc.Y; 173offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 216offset.Y = _lastRectangle.Top - mouseLoc.Y;
System\Windows\Forms\Design\CommandSet.cs (20)
1037loc.Y = primaryLocation.Y + primarySize.Height - size.Height; 1045loc.Y = primarySize.Height / 2 + primaryLocation.Y - size.Height / 2; 1078loc.Y = primaryLocation.Y; 1196loc.Y -= delta; 1200loc.Y += (gridSize.Height - delta); 1351loc.Y += deltaY; 1353loc.Y -= deltaY; 2428loc.Y = (loc.Y / grid.Height) * grid.Height; 2828curLoc.Y = lastLoc.Y + lastSize.Height; 2834curLoc.Y -= grid.Height * (n - primaryIndex); 2836curLoc.Y = primaryLoc.Y; 2840curLoc.Y += grid.Height * (primaryIndex - n); 2842curLoc.Y = primaryLoc.Y; 2849curLoc.Y += grid.Height * (n - primaryIndex); 2853curLoc.Y -= grid.Height * (primaryIndex - n); 2858curLoc.Y = lastLoc.Y + lastSize.Height + nEqualDelta; 3253min.Y = loc.Y; 3263max.Y = loc.Y + size.Height; 3288parentOffset.Y -= (max.Y - min.Y) / 2; 3381parentOffset.Y = 0;
System\Windows\Forms\Design\ComponentTray.cs (3)
1297_mouseDragEnd.Y = e.Y; 1811_whiteSpace.Y = _whiteSpace.Y * 2 + 3; 1851newLoc.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; 1022position.Y = rows.Length; 1031position.Y = i;
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (2)
531Y = e.Y 574Y = e.Y
1332 references to Y
Microsoft.Private.Windows.Core (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.RECT.g.cs (2)
45this(location.X, location.Y, unchecked(location.X + size.Width), unchecked(location.Y + size.Height))
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
146value.Y).Write(writer);
Windows\Win32\Foundation\LPARAM.cs (1)
28public static explicit operator LPARAM(Point value) => MAKELPARAM(value.X, value.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.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 (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.RECT.g.cs (2)
45this(location.X, location.Y, unchecked(location.X + size.Width), unchecked(location.Y + size.Height))
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
146value.Y).Write(writer);
Windows\Win32\Foundation\LPARAM.cs (1)
28public static explicit operator LPARAM(Point value) => MAKELPARAM(value.X, value.Y);
System.Windows.Forms (960)
System\Resources\ResXDataNode.cs (4)
375string newMessage = string.Format(SR.NotSupported, typeName, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X, nse.Message); 376XmlException xml = new(newMessage, nse, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X); 387dataNodeInfo.ReaderPosition.Y, 392new XmlException(newMessage, null, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X));
System\Resources\ResXResourceReader.cs (5)
376string newMessage = string.Format(SR.SerializationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, se.Message); 377XmlException xml = new(newMessage, se, pt.Y, pt.X); 383string newMessage = string.Format(SR.InvocationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, tie.InnerException?.Message); 384XmlException xml = new(newMessage, tie.InnerException, pt.Y, pt.X); 400XmlException xmlEx = new(e.Message, e, pt.Y, pt.X);
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
290clientLocation.Y = Math.Max(clientLocation.Y, clientRectangle.top); 291clientLocation.Y = Math.Min(clientLocation.Y, clientRectangle.bottom);
System\Windows\Forms\ActiveX\AxHost.cs (3)
1094sz.Height = phm.Y; 3256Bounds = new Rectangle(location.X, location.Y, ocxExtent.Width, ocxExtent.Height); 3263Bounds = 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\Components\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
180PInvoke.SetViewportOrgEx(hdc, originalOrigin.X + _windowBounds.Width - 1, originalOrigin.Y, lppt: null);
System\Windows\Forms\Components\ImageList\ImageList.cs (1)
510public void Draw(Graphics g, Point pt, int index) => Draw(g, pt.X, pt.Y, index);
System\Windows\Forms\Control.cs (7)
1771if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 2697set => SetBounds(value.X, value.Y, _width, _height, BoundsSpecified.Location); 8672cliprect.Offset(-offs.X, -offs.Y); 9592viewportOrg.Y, 9594viewportOrg.Y + Height); 9620clientOffset = new(clientOffset.X - windowRect.left, clientOffset.Y - windowRect.top);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
457imageBounds.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)
1685OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptlc.X, Ptlc.Y, 0)); 1702OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, Ptmc.X, Ptmc.Y, 0)); 1719OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Ptrc.X, Ptrc.Y, 0)); 1733OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, Ptl.X, Ptl.Y, 0)); 1778OnMouseDown(new MouseEventArgs(MouseButtons.Middle, 1, P.X, P.Y, 0)); 1795OnMouseDown(new MouseEventArgs(MouseButtons.Right, 1, Pt.X, Pt.Y, 0)); 1815OnMouseUp(new MouseEventArgs(MouseButtons.Right, 1, ptRBtnUp.X, ptRBtnUp.Y, 0)); 1837OnMouseMove(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\ComboBox\ComboBox.ModernComboAdapter.cs (3)
248new(center.X - halfWidth, center.Y - halfHeight), 249new(center.X, center.Y + halfHeight), 250new(center.X + halfWidth, center.Y - halfHeight)
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)
1141if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y)) 1712if (_ptCurrentCell.X == -1 && _ptCurrentCell.Y == -1) 1717Debug.Assert(_ptCurrentCell.X >= 0 && _ptCurrentCell.Y >= 0); 1719Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1720DataGridViewRow dataGridViewRow = Rows[_ptCurrentCell.Y]; // un-sharing row 1725if ((value is not null && (value.RowIndex != _ptCurrentCell.Y || value.ColumnIndex != _ptCurrentCell.X)) 1787Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 1788DataGridViewRow dataGridViewRow = Rows.SharedRow(_ptCurrentCell.Y); 1791Debug.Assert(IsSharedCellVisible(dataGridViewCell, _ptCurrentCell.Y)); 1805Debug.Assert(_ptCurrentCell.Y != -1); 1808bool previousVisibleRowExists = (Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1823Debug.Assert(_ptCurrentCell.Y != -1); 1826bool nextVisibleRowExists = (Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible) != -1); 1841Debug.Assert(_ptCurrentCell.Y != -1); 1859Debug.Assert(_ptCurrentCell.Y >= 0); 1860Debug.Assert(_ptCurrentCell.Y < Rows.Count); 1862return Rows[_ptCurrentCell.Y]; 2293return Rows[firstDisplayedCellAddress.Y].Cells[firstDisplayedCellAddress.X]; // un-shares the row of first displayed cell 2347if (ptFirstDisplayedCellAddress.Y == -1) 2364if (ptFirstDisplayedCellAddress.Y >= 0) 2854=> _ptCurrentCell.X == -1 ? null : CurrentCellInternal.GetInheritedStyleInternal(_ptCurrentCell.Y); 2905if (RowHeadersVisible && ShowEditingIcon && _ptCurrentCell.Y >= 0) 2908InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3899Debug.Assert(_ptCurrentCell.Y >= 0); 3900InvalidateCellPrivate(-1, _ptCurrentCell.Y); 3907Debug.Assert(_ptCurrentCell.Y >= 0); 3908InvalidateCellPrivate(-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 (540)
72if (cellAddress.Y < 0 || cellAddress.Y >= Rows.Count) 77int visibleRowIndex = Rows.GetRowCount(DataGridViewElementStates.Visible, 0, cellAddress.Y); 2624Debug.Assert(_ptCurrentCell.Y >= 0 && _ptCurrentCell.Y < Rows.Count); 2630if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2646DataGridViewCellCancelEventArgs dgvcce = new(_ptCurrentCell.X, _ptCurrentCell.Y); 2663if (IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) || !ColumnEditable(_ptCurrentCell.X)) 2685DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 2727((IDataGridViewEditingControl)EditingControl).EditingControlRowIndex = _ptCurrentCell.Y; 2764InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3099Debug.Assert(_ptCurrentCell.Y != -1); 3160_ptCurrentCell.Y, 3185InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 3264if (currentCellDirty || _ptCurrentCell.Y == -1 || _ptCurrentCell.X == -1) 3292if (_ptCurrentCell.Y > -1) 3294InvalidateRowPrivate(_ptCurrentCell.Y); 3298DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 3315if (discardNewRow && _ptCurrentCell.Y == NewRowIndex - 1) 3323if (!IsCurrentRowDirty && _ptCurrentCell.Y == NewRowIndex - 1 && _dataGridViewState1[State1_NewRowCreatedByEditing]) 3409if ((DataConnection.CurrencyManager?.Count ?? 0) <= _ptCurrentCell.Y) 3824OnCellLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3834OnRowLeave(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3845if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 3847InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 3860if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3872_ptCurrentCell.Y, 3884OnCellEnter(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3895_ptCurrentCell.Y, 3910OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 3937if (OnCellValidating(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y, context)) 3947_ptCurrentCell.Y, 3979_ptCurrentCell.Y, 4018OnCellValidated(ref dataGridViewCurrentCell, _ptCurrentCell.X, _ptCurrentCell.Y); 4085int rowIndex = _ptCurrentCell.Y; 4129fireRowLeave: _ptCurrentCell.Y != rowIndex, 4130fireRowEnter: _ptCurrentCell.Y != rowIndex, 4139if (_ptCurrentCell.Y != rowIndex && _ptCurrentCell.Y != -1) 4143int rowIndexTmp = _ptCurrentCell.Y; 4194forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 5533Debug.Assert(_ptCurrentCell.Y == NewRowIndex); 5795int adjustedY = _editingPanel.Location.Y + e.Y; 5799adjustedY += EditingControl.Location.Y; 6226int curRowIndex = _ptCurrentCell.Y; 6271if (curRowIndex != _ptCurrentCell.Y || curColIndex != _ptCurrentCell.X) 6295InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 6322InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 8653if (_ptAnchorCell.Y != -1 8654&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) != 0 8691if (_ptAnchorCell.Y != -1 8692&& ((Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0 8873if (((_ptAnchorCell.Y != -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Frozen) == 0) 8874|| (_ptCurrentCell.Y != -1 && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0)) 9689HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 9690int mouseX = ptMouse.X, mouseY = ptMouse.Y; 9712ptMouse.Y - yOffset - (yOffset / Math.Abs(yOffset))) 9742_uneditedFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9753dataGridViewCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; // un-share the edited cell 9764_ptCurrentCell.Y, 9783object? initialFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9788dataGridViewCell.InitializeEditingControl(_ptCurrentCell.Y, initialFormattedValue, dataGridViewCellStyle); 9796_ptCurrentCell.Y, 10447&& (includeNewRow || !AllowUserToAddRowsInternal || firstDisplayedCellAddress.Y != Rows.Count - 1)) 10451firstDisplayedCellAddress.Y, 11958HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 11966Debug.Assert(_ptMouseDownCell.Y == hti._row); 12030BeginRowResize(ptGridCoord.Y, hti._mouseBarOffset, rowIndex); 12099BeginColumnHeadersResize(ptGridCoord.Y, hti._mouseBarOffset); 12124if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row)) 12129forCurrentCellChange: _ptCurrentCell.X != hti._col || _ptCurrentCell.Y != hti._row, 12130forCurrentRowChange: _ptCurrentCell.Y != hti._row)) 12212int oldEdgeRowIndex = _ptCurrentCell.Y; 12222_ptAnchorCell.Y, 12402int oldEdgeRowIndex = _ptCurrentCell.Y; 12412_ptAnchorCell.Y, 12466&& _ptAnchorCell.Y > -1 && (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 12513if (hti._row >= _ptAnchorCell.Y) 12515SelectRowRange(_ptAnchorCell.Y, hti._row, true); 12519SelectRowRange(hti._row, _ptAnchorCell.Y, true); 12608int oldEdgeRowIndex = _ptCurrentCell.Y; 12618_ptAnchorCell.Y, 12735&& _ptMouseDownCell.Y == -1 12741HitTestInfo hti = HitTest(ptGridCoord.X, ptGridCoord.Y); 12757|| Math.Abs(_ptMouseDownGridCoord.Y - ptGridCoord.Y) >= s_dragSize.Height) 12822int oldEdgeRowIndex = _ptCurrentCell.Y; 12823if ((hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12842_ptAnchorCell.Y, 12846if (hti._col != _ptCurrentCell.X || hti._row != _ptCurrentCell.Y) 12881&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 13760int oldCurrentCellY = _ptCurrentCell.Y; 13766fireRowLeave: rowIndex != _ptCurrentCell.Y, 13767fireRowEnter: rowIndex != _ptCurrentCell.Y, 13925_ptCurrentCell.Y, 14185if (_ptCurrentCell.X != -1 && hti._col != _ptCurrentCell.X && !CommitEditForOperation(hti._col, _ptCurrentCell.Y, true)) 14269if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(hti._col)) 14276_ptCurrentCell.Y, 14502&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.ReadOnly) == 0 14603&& _ptMouseDownCell.Y == rowIndex 14605|| _ptMouseDownCell.Y == -1 14606|| (columnIndex == _ptCurrentCell.X && rowIndex == _ptCurrentCell.Y)))) 14637InvalidateCellPrivate(-1, _ptCurrentCell.Y); 14640if (IsCurrentCellDirty && NewRowIndex == _ptCurrentCell.Y) 14842if (elementState == DataGridViewElementStates.Visible && _ptCurrentCell.Y == rowIndex) 14850Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y); 14864if (_ptCurrentCell.Y == rowIndex 14903&& _ptCurrentCell.Y == dataGridViewCell.RowIndex 15081_ptCurrentCell.Y, 15089OnCellEnter(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15114InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15123InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15248InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15294ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 15339newCurrentCell.Y, 15372if (lastInsertion && newCurrentCell.Y != -1) 15377newCurrentCell.Y, 15412if (newCurrentCell.Y != -1) 15417newCurrentCell.Y, 15476_ptCurrentCell.Y); 15593if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15595newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + insertionCount); 15621if (newCurrentCell.Y != -1) 15676if (_ptCurrentCell.Y != -1 && rowIndexInserted <= _ptCurrentCell.Y) 15678newCurrentCell = new Point(_ptCurrentCell.X, _ptCurrentCell.Y + dataGridViewRows.Length); 15745if (dataGridViewCell.KeyDownUnsharesRowInternal(e, _ptCurrentCell.Y)) 15748_ = Rows[_ptCurrentCell.Y]; 15749CurrentCellInternal.OnKeyDownInternal(e, _ptCurrentCell.Y); 15753dataGridViewCell.OnKeyDownInternal(e, _ptCurrentCell.Y); 15804if (dataGridViewCell.KeyPressUnsharesRowInternal(e, _ptCurrentCell.Y)) 15807_ = Rows[_ptCurrentCell.Y]; 15808CurrentCellInternal.OnKeyPressInternal(e, _ptCurrentCell.Y); 15812dataGridViewCell.OnKeyPressInternal(e, _ptCurrentCell.Y); 15838if (dataGridViewCell.KeyUpUnsharesRowInternal(e, _ptCurrentCell.Y)) 15841_ = Rows[_ptCurrentCell.Y]; 15842CurrentCellInternal.OnKeyUpInternal(e, _ptCurrentCell.Y); 15846dataGridViewCell.OnKeyUpInternal(e, _ptCurrentCell.Y); 15880OnCellLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15886OnRowLeave(ref dataGridViewCell, _ptCurrentCell.X, _ptCurrentCell.Y); 15894if (_ptCurrentCell.X > -1 && _ptCurrentCell.Y > -1) 15896InvalidateCellPrivate(columnIndex: _ptCurrentCell.X, rowIndex: _ptCurrentCell.Y); 15912InvalidateCell(_ptCurrentCell.X, _ptCurrentCell.Y); 15936&& _ptMouseDownCell.Y == hti._row 15939|| _ptMouseDownCell.Y == -1 15940|| (_ptMouseDownCell.X == _ptCurrentCell.X && _ptMouseDownCell.Y == _ptCurrentCell.Y))) 16024if (_ptMouseDownCell.X == hti._col && _ptMouseDownCell.Y == hti._row) 16170Debug.Assert(_ptMouseDownCell.Y != -2); 16225&& _ptMouseEnteredCell.Y >= -1 && _ptMouseEnteredCell.Y < Rows.Count) 16227OnCellMouseLeave(new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y)); 16437&& _ptMouseDownCell.Y == hti._row 16926&& !Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X].ReadOnly) // Un-shares the row 16964newCurrentCell.Y, 17010if (newCurrentCell.Y != -1) 17015newCurrentCell.Y, 17129newCurrentCell = new Point(newX, (newX == -1) ? -1 : _ptCurrentCell.Y); 17316if (_ptCurrentCell.Y != -1 && rowIndexDeleted <= _ptCurrentCell.Y) 17319if (rowIndexDeleted == _ptCurrentCell.Y) 17340Debug.Assert(rowIndexDeleted < _ptCurrentCell.Y); 17341newY = _ptCurrentCell.Y - 1; 17345if (rowIndexDeleted == _ptCurrentCell.Y) 17455if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 17457SetCurrentCellAddressCore(_ptCurrentCellCache.X, _ptCurrentCellCache.Y, false, false, false); 17467if (_ptCurrentCell.X == dataGridViewRow.Index && _ptCurrentCell.Y == columnIndex) 17472_ptCurrentCellCache.Y = _ptCurrentCell.Y; 18013if (dataGridViewColumn is not null && hti._row != _ptCurrentCell.Y) 18016int oldCurrentCellY = _ptCurrentCell.Y; 18023fireRowLeave: hti._row != _ptCurrentCell.Y, 18024fireRowEnter: hti._row != _ptCurrentCell.Y, 18112&& _ptAnchorCell.Y > -1 18113&& (Rows.GetRowState(_ptAnchorCell.Y) & DataGridViewElementStates.Selected) != 0) 18169if (hti._row >= _ptAnchorCell.Y) 18171SelectRowRange(_ptAnchorCell.Y, hti._row, true); 18175SelectRowRange(hti._row, _ptAnchorCell.Y, true); 18187if (hti._row != _ptCurrentCell.Y) 18205else if (_ptCurrentCell.Y != -1) 18210_ptCurrentCell.Y, 18467if (_ptCurrentCell.Y != -1 18468&& hti._row != _ptCurrentCell.Y 18546if (_ptCurrentCell.Y != -1 && hti._row != _ptCurrentCell.Y) 18743if (e.StateChanged == DataGridViewElementStates.ReadOnly && rowIndex == _ptCurrentCell.Y && !_dataGridViewOper[OperationInReadOnlyChange]) 18763if (_ptCurrentCell.X != -1 && dataGridViewRow.Index == _ptCurrentCell.Y && EditingControl is not null) 18892if (pt.Y < 0 && step < 0) 18894Invalidate(new Rectangle(new Point(0, -pt.Y), 18899if (pt.Y > rect.Bottom && step > 0) 18902new Size(ClientSize.Width, ClientSize.Height - (pt.Y - rect.Bottom) - step))); 19049_ptCurrentCell.Y, 19130if (OnRowValidating(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y)) 19142OnRowValidated(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 19145if (DataSource is not null && _ptCurrentCell.X >= 0 && AllowUserToAddRowsInternal && NewRowIndex == _ptCurrentCell.Y) 19148int rowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 19885Rectangle cellBounds = new(leftEdge, GetRowYFromIndex(_ptCurrentCell.Y), 19886Columns[_ptCurrentCell.X].Width, Rows.SharedRow(_ptCurrentCell.Y).GetHeight(_ptCurrentCell.Y)); 19900if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 19926bool isFirstDisplayedRow = FirstDisplayedRowIndex == _ptCurrentCell.Y; 20222if (_ptCurrentCell.Y != -1) 20224nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 20271Debug.Assert(_ptAnchorCell.Y >= 0); 20273int oldEdgeRowIndex = _ptCurrentCell.Y; 20284_ptAnchorCell.Y, 20403int oldEdgeRowIndex = _ptCurrentCell.Y; 20414_ptAnchorCell.Y, 20520if (_ptAnchorCell.Y == -1 || _ptCurrentCell.X == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20527Debug.Assert(_ptAnchorCell.Y >= 0); 20528SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 20548SetSelectedRowCore(_ptCurrentCell.Y, false); 20651if (nextVisibleRowIndex >= _ptAnchorCell.Y) 20653SelectRowRange(_ptAnchorCell.Y, nextVisibleRowIndex, true); 20657SelectRowRange(nextVisibleRowIndex, _ptAnchorCell.Y, true); 20756Debug.Assert(_ptAnchorCell.Y >= 0); 20757if (_ptAnchorCell.Y == -1 || _ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20763if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20766SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 20771int oldEdgeRowIndex = _ptCurrentCell.Y; 20776_ptAnchorCell.Y, 20794if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20800if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20802SetSelectedRowCore(_ptCurrentCell.Y, false); 20807SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 20846if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(lastVisibleRowIndex)) 20852if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20906if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 20912if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 20917if (_ptAnchorCell.Y == -1) 20923if (nextVisibleRowIndex >= _ptAnchorCell.Y) 20925SelectRowRange(_ptAnchorCell.Y, nextVisibleRowIndex, true); 20929SelectRowRange(nextVisibleRowIndex, _ptAnchorCell.Y, true); 20942int oldEdgeRowIndex = _ptCurrentCell.Y; 20953_ptAnchorCell.Y, 21004if (_ptCurrentCell.Y == -1 || IsRowOutOfBounds(nextVisibleRowIndex)) 21010if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21171int oldEdgeRowIndex = _ptCurrentCell.Y; 21176_ptAnchorCell.Y, 21219if (_ptCurrentCell.Y > -1 21220&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21223SelectRowRange(_ptCurrentCell.Y, lastVisibleRowIndex, select: true); 21228int oldEdgeRowIndex = _ptCurrentCell.Y; 21233_ptAnchorCell.Y, 21240if (_ptCurrentCell.Y > -1 21241&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21257if (_ptCurrentCell.Y > -1 21258&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21354int oldEdgeRowIndex = _ptCurrentCell.Y; 21364_ptAnchorCell.Y, 21426if (MultiSelect && _ptCurrentCell.Y >= 0) 21428if (_ptAnchorCell.Y == -1) 21433SelectRowRange(_ptAnchorCell.Y, lastVisibleRowIndex, true); 21521int rowIndex = _ptCurrentCell.Y; 21565Debug.Assert(_ptCurrentCell.Y != -1); 21568|| IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21572&& !IsSharedCellReadOnly(CurrentCellInternal, _ptCurrentCell.Y) 21575bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, forCurrentCellChange: false); 21645int oldEdgeRowIndex = _ptCurrentCell.Y; 21650_ptAnchorCell.Y, 21693if (_ptCurrentCell.Y > -1 21694&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21697SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, select: true); 21702int oldEdgeRowIndex = _ptCurrentCell.Y; 21707_ptAnchorCell.Y, 21714if (_ptCurrentCell.Y > -1 21715&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21731if (_ptCurrentCell.Y > -1 21732&& (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 21833int oldEdgeRowIndex = _ptCurrentCell.Y; 21843_ptAnchorCell.Y, 21947&& !IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 21964bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22111if (CurrentCell is null || _ptCurrentCell.X == -1 || _ptCurrentCell.Y == -1) 22200if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22205if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22214int oldEdgeRowIndex = _ptCurrentCell.Y; 22224_ptAnchorCell.Y, 22231SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22234success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22261if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22266if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22272SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22273success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22311if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22316if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22343success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22370if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22375if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22382success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22420if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22457int oldEdgeRowIndex = _ptCurrentCell.Y; 22467_ptAnchorCell.Y, 22474SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22478success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 22505if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22523SetSelectedCellCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true); 22526success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22562if (!ScrollIntoView(previousVisibleColumnIndex, _ptCurrentCell.Y, true)) 22567if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(previousVisibleColumnIndex)) 22572success = SetCurrentCellAddressCore(previousVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22621if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22628int oldEdgeRowIndex = _ptCurrentCell.Y; 22638_ptAnchorCell.Y, 22643_ptCurrentCell.Y, 22651if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22656if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22662SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22665_ptCurrentCell.Y, 22696if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, forCurrentCellChange: true)) 22701if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22707SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, selected: true); 22710_ptCurrentCell.Y, 22746if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22751if (_ptAnchorCell.X == -1 || _ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22759success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22764if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22776success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22799if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22804if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22811success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22839if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22858int oldEdgeRowIndex = _ptCurrentCell.Y; 22863_ptAnchorCell.Y, 22868success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 22873if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22890SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 22891SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22894success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22917if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22935SetSelectedCellCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true); 22938success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 22962if (!ScrollIntoView(firstVisibleColumnIndex, _ptCurrentCell.Y, true)) 22967if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(firstVisibleColumnIndex)) 22972success = SetCurrentCellAddressCore(firstVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23001if (_ptCurrentCell.Y == -1) 23011nextScreenVisibleRowIndex = _ptCurrentCell.Y; 23027_ptCurrentCell.Y, 23103Debug.Assert(_ptAnchorCell.Y >= 0); 23105int oldEdgeRowIndex = _ptCurrentCell.Y; 23106if (_ptAnchorCell.Y == -1) 23115_ptAnchorCell.Y, 23143Debug.Assert(_ptAnchorCell.Y >= 0); 23144if (_ptAnchorCell.Y == -1) 23149if (_ptAnchorCell.Y < nextScreenVisibleRowIndex) 23151SelectRowRange(_ptAnchorCell.Y, nextScreenVisibleRowIndex, true); 23155SelectRowRange(nextScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23179Debug.Assert(_ptAnchorCell.Y >= 0); 23180if (_ptAnchorCell.Y == -1) 23185if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23188if (_ptAnchorCell.Y < nextScreenVisibleRowIndex) 23190SelectRowRange(_ptAnchorCell.Y, nextScreenVisibleRowIndex, true); 23194SelectRowRange(nextScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23200int oldEdgeRowIndex = _ptCurrentCell.Y; 23205_ptAnchorCell.Y, 23212if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23262if (_ptCurrentCell.Y == -1) 23272previousScreenVisibleRowIndex = _ptCurrentCell.Y; 23362Debug.Assert(_ptAnchorCell.Y >= 0); 23364int oldEdgeRowIndex = _ptCurrentCell.Y; 23374_ptAnchorCell.Y, 23401Debug.Assert(_ptAnchorCell.Y >= 0); 23402if (_ptAnchorCell.Y == -1) 23407if (_ptAnchorCell.Y < previousScreenVisibleRowIndex) 23409SelectRowRange(_ptAnchorCell.Y, previousScreenVisibleRowIndex, true); 23413SelectRowRange(previousScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23437Debug.Assert(_ptAnchorCell.Y >= 0); 23438if (_ptAnchorCell.Y == -1) 23443if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23446if (_ptAnchorCell.Y < previousScreenVisibleRowIndex) 23448SelectRowRange(_ptAnchorCell.Y, previousScreenVisibleRowIndex, true); 23452SelectRowRange(previousScreenVisibleRowIndex, _ptAnchorCell.Y, true); 23458int oldEdgeRowIndex = _ptCurrentCell.Y; 23463_ptAnchorCell.Y, 23470if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 23579if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23584if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23592int oldEdgeRowIndex = _ptCurrentCell.Y; 23602_ptAnchorCell.Y, 23609SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23612success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23639if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23644if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23650SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23651success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23689if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23694if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23721success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23748if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23753if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23760success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23798if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23803if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23842int oldEdgeRowIndex = _ptCurrentCell.Y; 23847_ptAnchorCell.Y, 23854SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23858success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, !MultiSelect, false, false); 23885if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23903SetSelectedCellCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true); 23906success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23942if (!ScrollIntoView(nextVisibleColumnIndex, _ptCurrentCell.Y, true)) 23947if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(nextVisibleColumnIndex)) 23952success = SetCurrentCellAddressCore(nextVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 23999if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24004if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24018int oldEdgeRowIndex = _ptCurrentCell.Y; 24023_ptAnchorCell.Y, 24026success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24032SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24033success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24056if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24061if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24067SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24068success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24094if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24099if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24114success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24121success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24144if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24149if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24156success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24182if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24187if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24208int oldEdgeRowIndex = _ptCurrentCell.Y; 24213_ptAnchorCell.Y, 24218success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, false, false, false); 24230SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 24231SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24234success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24257if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24262if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24275SetSelectedCellCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true); 24278success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24302if (!ScrollIntoView(lastVisibleColumnIndex, _ptCurrentCell.Y, true)) 24307if (_ptCurrentCell.Y == -1 || IsColumnOutOfBounds(lastVisibleColumnIndex)) 24312success = SetCurrentCellAddressCore(lastVisibleColumnIndex, _ptCurrentCell.Y, true, false, false); 24375if (_selectedBandIndexes[bandIndex] != _ptCurrentCell.Y) 24387if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) == 0) 24389Debug.Assert(!_selectedBandIndexes.Contains(_ptCurrentCell.Y)); 24390SetSelectedRowCore(_ptCurrentCell.Y, true); 24612if (_ptCurrentCell.Y != -1) 24614previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 24654Debug.Assert(_ptAnchorCell.Y >= 0); 24656int oldEdgeRowIndex = _ptCurrentCell.Y; 24661_ptAnchorCell.Y, 24751Debug.Assert(_ptAnchorCell.Y >= 0); 24752if (_ptAnchorCell.Y == -1) 24758int oldEdgeRowIndex = _ptCurrentCell.Y; 24763_ptAnchorCell.Y, 24853Debug.Assert(_ptAnchorCell.Y >= 0); 24854SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, true); 24869SetSelectedRowCore(_ptCurrentCell.Y, false); 24943if (_ptAnchorCell.Y == -1) 24948if (_ptAnchorCell.Y >= previousVisibleRowIndex) 24950SelectRowRange(previousVisibleRowIndex, _ptAnchorCell.Y, true); 24954SelectRowRange(_ptAnchorCell.Y, previousVisibleRowIndex, true); 25036Debug.Assert(_ptAnchorCell.Y >= 0); 25037if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25040SelectRowRange(firstVisibleRowIndex, _ptAnchorCell.Y, true); 25045int oldEdgeRowIndex = _ptCurrentCell.Y; 25050_ptAnchorCell.Y, 25069if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25071SetSelectedRowCore(_ptCurrentCell.Y, false); 25076SetSelectedCellCore(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25110if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25158if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25163if (_ptAnchorCell.Y == -1) 25168if (_ptAnchorCell.Y >= previousVisibleRowIndex) 25170SelectRowRange(previousVisibleRowIndex, _ptAnchorCell.Y, true); 25174SelectRowRange(_ptAnchorCell.Y, previousVisibleRowIndex, true); 25185int oldEdgeRowIndex = _ptCurrentCell.Y; 25186if (_ptAnchorCell.Y == -1) 25195_ptAnchorCell.Y, 25240if ((Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Selected) != 0) 25346if (!IsSharedCellReadOnly(dataGridViewCell, _ptCurrentCell.Y) 25350bool success = ScrollIntoView(_ptCurrentCell.X, _ptCurrentCell.Y, false); 25363object? nullValue = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: false).NullValue; 25381InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 25422_ptCurrentCell.Y, 25436dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25439return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, dgvcpe.Value); 25461dataGridViewCurrentCell = Rows[_ptCurrentCell.Y].Cells[_ptCurrentCell.X]; 25464return dataGridViewCurrentCell.SetValueInternal(_ptCurrentCell.Y, val); 25545Debug.Assert(_ptCurrentCell.Y != -1); 25547DataGridViewCellStyle dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true); 26084forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26085forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26102forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26103forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26116forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26117forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26281if (_ptCurrentCell.X >= 0 && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex)) 26344forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26345forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26373forCurrentCellChange: forCurrentCellChange && (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex), 26374forCurrentRowChange: _ptCurrentCell.Y != rowIndex)) 26423if (EditingControl is not null && (Rows.GetRowState(_ptCurrentCell.Y) & DataGridViewElementStates.Frozen) == 0) 26856if (_ptCurrentCell.X != columnIndex || _ptCurrentCell.Y != rowIndex) 26877int oldCurrentCellY = _ptCurrentCell.Y; 26923Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 27017OnCellEnter(ref dataGridViewCellTmp, _ptCurrentCell.X, _ptCurrentCell.Y); 27026if (oldCurrentCellY != _ptCurrentCell.Y && RowHeadersVisible && oldCurrentCellY < Rows.Count) 27032InvalidateCellPrivate(_ptCurrentCell.X, _ptCurrentCell.Y); 27033if (RowHeadersVisible && oldCurrentCellY != _ptCurrentCell.Y) 27035InvalidateCellPrivate(-1, _ptCurrentCell.Y); 27059AccessibilityNotifyCurrentCellChanged(new Point(_ptCurrentCell.X, _ptCurrentCell.Y)); 27087int oldCurrentCellY = _ptCurrentCell.Y; 27129Debug.Assert(oldCurrentCellY == _ptCurrentCell.Y); 28294_ptCurrentCellCache.Y = _ptCurrentCell.Y; 28363if (!IsInnerCellOutOfBounds(_ptCurrentCellCache.X, _ptCurrentCellCache.Y)) 28367_ptCurrentCellCache.Y, 28423if (rowIndex1 == _ptCurrentCellCache.Y) 28427else if (rowIndex2 == _ptCurrentCellCache.Y) 28581if (_ptCurrentCell.Y != -1) 28583nextVisibleRowIndex = Rows.GetNextRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28604targetRowIndex = _ptCurrentCell.Y; 28676if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 28742if (_ptCurrentCell.Y != -1) 28744previousVisibleRowIndex = Rows.GetPreviousRow(_ptCurrentCell.Y, DataGridViewElementStates.Visible); 28773targetRowIndex = _ptCurrentCell.Y; 28845if (targetRowIndex != _ptCurrentCell.Y || MultiSelect) 29171PositionEditingControl(rowIndex == -1 || _ptCurrentCell.Y != rowIndex, true, false); 29228HitTestInfo htiToUse = hti ?? HitTest(ptMouse.X, ptMouse.Y); 29234if (_ptMouseEnteredCell.X != htiToUse._col || _ptMouseEnteredCell.Y != htiToUse._row) 29239&& _ptMouseEnteredCell.Y >= -1 29240&& _ptMouseEnteredCell.Y < Rows.Count) 29242dgvce = new DataGridViewCellEventArgs(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29266&& _ptMouseEnteredCell.Y >= -1 29267&& _ptMouseEnteredCell.Y < Rows.Count) 29269DataGridViewCellEventArgs dgvce = new(_ptMouseEnteredCell.X, _ptMouseEnteredCell.Y); 29938HitTestInfo hti = HitTest(ptMouse.X, ptMouse.Y); 29939int mouseX = ptMouse.X, mouseY = ptMouse.Y; 29952hti = HitTest(mouseX, ptMouse.Y - yOffset - normOffset); 29961? HitTest(ptMouse.X - xOffset - (xOffset / Math.Abs(xOffset)), ptMouse.Y - yOffset - normOffset) 29962: HitTest(mouseX, ptMouse.Y - yOffset - normOffset); 30045HitTestInfo 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)
400ptCurrentCell.Y == RowIndex && 1489if (ColumnIndex == ptCurrentCell.X && rowIndex == ptCurrentCell.Y) 2428|| (dataGridView.AllowUserToAddRowsInternal && rowIndex > -1 && rowIndex == dataGridView.NewRowIndex && rowIndex != dataGridView.CurrentCellAddress.Y) 2712ptCurrentCell.Y == rowIndex && 3914if (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 1302if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1441else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (49)
808else if (DataGridView.MouseEnteredCellAddress.Y == rowIndex && 1045sortGlyphLocation.Y + s_sortGlyphHeight - line - 1, 1047sortGlyphLocation.Y + s_sortGlyphHeight - line - 1); 1052sortGlyphLocation.Y + s_sortGlyphHeight - s_sortGlyphWidth / 2 - 1, 1054sortGlyphLocation.Y + s_sortGlyphHeight - s_sortGlyphWidth / 2); 1066sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1068sortGlyphLocation.Y); 1071sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1073sortGlyphLocation.Y); 1076sortGlyphLocation.Y, 1078sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1081sortGlyphLocation.Y, 1083sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1086sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1088sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1095sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1097sortGlyphLocation.Y); 1100sortGlyphLocation.Y + s_sortGlyphHeight - 2, 1102sortGlyphLocation.Y); 1105sortGlyphLocation.Y, 1107sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1110sortGlyphLocation.Y, 1112sortGlyphLocation.Y + s_sortGlyphHeight - 2); 1115sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1117sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1132sortGlyphLocation.Y + line + 2, 1134sortGlyphLocation.Y + line + 2); 1139sortGlyphLocation.Y + s_sortGlyphWidth / 2 + 1, 1141sortGlyphLocation.Y + s_sortGlyphWidth / 2 + 2); 1153sortGlyphLocation.Y + 1, 1155sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1158sortGlyphLocation.Y + 1, 1160sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1163sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1165sortGlyphLocation.Y + 1); 1168sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1170sortGlyphLocation.Y + 1); 1173sortGlyphLocation.Y, 1175sortGlyphLocation.Y); 1182sortGlyphLocation.Y + 1, 1184sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1187sortGlyphLocation.Y + 1, 1189sortGlyphLocation.Y + s_sortGlyphHeight - 1); 1192sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1194sortGlyphLocation.Y + 1); 1197sortGlyphLocation.Y + s_sortGlyphHeight - 1, 1199sortGlyphLocation.Y + 1); 1202sortGlyphLocation.Y, 1204sortGlyphLocation.Y);
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)
938bool 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\Labels\LinkLabel.cs (2)
310if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND)
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (1)
65Link? hit = owner.PointInLink(p.X, p.Y);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1504return IndexFromPoint(p.X, p.Y);
System\Windows\Forms\Controls\ListView\ListView.cs (8)
3219return FindNearestItem(dir, point.X, point.Y); 3710public ListViewHitTestInfo HitTest(Point point) => HitTest(point.X, point.Y); 4385item = GetItemAt(pos.X, pos.Y); 5169int scrollY = GetItemPosition(toLVItem).Y - GetItemPosition(fromLVItem).Y; 6012AccessibleObject? accessibilityObject = AccessibilityObject.HitTest(screenPoint.X, screenPoint.Y); 6734OnMouseClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 6739OnMouseUp(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)
1326public HitTestInfo HitTest(Point point) => HitTest(point.X, point.Y);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (16)
1943if (y >= (location.Y - s_cyDivider) && 1944y <= (location.Y + 1)) 1955if (y >= (location.Y - s_cyDivider) && 1956y <= (location.Y + 1)) 1970int gridTop = _gridView.Location.Y; 1990int high = _gridView.Location.Y + MinGridHeight; 2449OnMouseMove(new MouseEventArgs(e.Button, e.Clicks, newPoint.X, newPoint.Y, e.Delta)); 2465OnMouseDown(new MouseEventArgs(e.Button, e.Clicks, newPoint.X, newPoint.Y, e.Delta)); 2686int maxSpace = endSize - (_gridView.Location.Y + MinGridHeight); 2773endSize = _helpPane.Location.Y - s_cyDivider; 2807endSize = _commandsPane.Location.Y - s_cyDivider; 2810_gridView.Size = new Size(Size.Width, endSize - _gridView.Location.Y); 2945pevent.Graphics.FillRectangle(backgroundBrush, new Rectangle(0, 0, width, psheetLoc.Y)); 2947int yLast = psheetLoc.Y + _gridView.Size.Height; 2954new Rectangle(0, yLast, width, _commandsPane.Location.Y - yLast)); 2963new 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)
480return new Point(point.X + (rect.Width / 2), point.Y + (rect.Height / 2)); 632if (pt.Y > propertyGridViewBottom) 637if (pt.Y + rect.Height > propertyGridViewBottom) 639rect.Height = propertyGridViewBottom - pt.Y; 642return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height); 701g.TranslateTransform(newOrigin.X, newOrigin.Y); 702r.Offset(-newOrigin.X, -newOrigin.Y); 1134clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1189clipRect.Offset(-newOrigin.X, -newOrigin.Y); 1457if (rectScreen.Y + rectScreen.Height < (size.Height + location.Y + EditTextBox.Height)) 1483_dropDownHolder.SetBounds(location.X, location.Y, size.Width, size.Height); 1693pt.Y = (y - _location.Y) / (1 + RowHeight); 1934rect.Y = row * (RowHeight + 1) + 1 + _location.Y; 2636Math.Abs(screenPoint.Y - _rowSelectPos.Y) < SystemInformation.DoubleClickSize.Height) 3020GridEntry? gridEntry = GetGridEntryFromRow(pos.Y); 3025Rectangle r = GetRectangle(pos.Y, RowLabel); 3076rowMoveCurrent = point.Y; 3099Rectangle itemRect = GetRectangle(point.Y, point.X); 3325startRow = Math.Max(0, startPosition.Y); 3330endRow = endPosition.Y; 3352g.DrawLine(splitterPen, _labelWidth, location.Y, _labelWidth, visibleCount * (RowHeight + 1) + location.Y); 3370currentRowHeight = i * (RowHeight + 1) + location.Y; 3392currentRowHeight = visibleCount * (RowHeight + 1) + location.Y; 5292mouseLoc = FindPosition(mouseLoc.X, mouseLoc.Y); 5299GridEntry? curEntry = GetGridEntryFromRow(mouseLoc.Y); 5307Rectangle itemRect = GetRectangle(mouseLoc.Y, mouseLoc.X); 5313tipPt = 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)
2245Point 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)
777delta = y - _anchor.Y; 957int size = GetSplitSize(splitTarget, x - Left + _anchor.X, y - Top + _anchor.Y);
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
392r.Y -= p.Y; 592if (value.X < 0 || value.Y < 0)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (3)
2715clientTopLeft.Y, 2717clientTopLeft.Y + clientRect.Height); 3036clientTopLeft.Y - windowRect.top,
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)
594int deltaBottomEdge = Math.Abs(rootHwndClientArea.bottom - gripLocation.Y);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (8)
2164int adjacentSide = otherItemMidLocation.Y - midPointOfCurrent.Y; 2605if (location.X != x || location.Y != y) 2625if (location.X != x || location.Y != y) 3330mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 3386mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 3430mea = new MouseEventArgs(mea.Button, mea.Clicks, itemRelativePoint.X, itemRelativePoint.Y, mea.Delta); 4513cursorLocation.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)
3454toPoint.Y += currentToolStripItemLocation.Y; 3466fromPoint.Y += currentToolStripItemLocation.Y; 3481fromPoint.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); 861Rectangle bottomLeftParentVerticalPixels = new(bottomLeft.X, bottomLeft.Y - 1, 1, 2); 864Rectangle bottomRightHorizontalPixels = new(bottomRight.X - 1, bottomRight.Y, 2, 1); 865Rectangle bottomRightVerticalPixels = new(bottomRight.X, bottomRight.Y - 1, 1, 2); 872topRightHorizontalPixels = new Rectangle(topRight.X - 1, topRight.Y, 1, 1); 873topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 2); 877topRightHorizontalPixels = new Rectangle(topRight.X - 2, topRight.Y, 2, 1); 878topRightVerticalPixels = new Rectangle(topRight.X, topRight.Y, 1, 3); 1148b.TranslateTransform(parent.Width - control.Location.X, parent.Height - control.Location.Y); 1306g.FillRectangle(brush, top1.X, top1.Y, 1, 1); 1307g.FillRectangle(brush, top2.X, top2.Y, 1, 1); 1395Rectangle otherBottom = new(bottomLeft.X, bottomLeft.Y - 2, 1, 1); 1656new(middle.X - Offset2X, middle.Y + 1), 1657new(middle.X + Offset2X + 1, middle.Y + 1), 1658new(middle.X, middle.Y - Offset2Y) 1662new(middle.X + Offset2X, middle.Y - Offset2Y - 1), 1663new(middle.X + Offset2X, middle.Y + Offset2Y + 1), 1664new(middle.X - 1, middle.Y) 1668new(middle.X - Offset2X, middle.Y - Offset2Y - 1), 1669new(middle.X - Offset2X, middle.Y + Offset2Y + 1), 1670new(middle.X + 1, middle.Y) 1674new(middle.X - Offset2X, middle.Y - 1), 1675new(middle.X + Offset2X + 1, middle.Y - 1), 1676new(middle.X, middle.Y + Offset2Y)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (12)
669arrow[0] = new(middle.X - Offset2X, middle.Y + 1); 670arrow[1] = new(middle.X + Offset2X + 1, middle.Y + 1); 671arrow[2] = new(middle.X, middle.Y - Offset2Y); 675arrow[0] = new(middle.X + Offset2X, middle.Y - s_offset4Y); 676arrow[1] = new(middle.X + Offset2X, middle.Y + s_offset4Y); 677arrow[2] = new(middle.X - horizontalOffset, middle.Y); 681arrow[0] = new(middle.X - Offset2X, middle.Y - s_offset4Y); 682arrow[1] = new(middle.X - Offset2X, middle.Y + s_offset4Y); 683arrow[2] = new(middle.X + horizontalOffset, middle.Y); 687arrow[0] = new(middle.X - Offset2X, middle.Y - 1); 688arrow[1] = new(middle.X + Offset2X + 1, middle.Y - 1); 689arrow[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)
1630public TreeViewHitTestInfo HitTest(Point pt) => HitTest(pt.X, pt.Y); 1671public TreeNode? GetNodeAt(Point pt) => GetNodeAt(pt.X, pt.Y); 3056OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), button, 1, pos.X, pos.Y)); 3057OnClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3058OnMouseClick(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3086OnMouseUp(new MouseEventArgs(button, 1, pos.X, pos.Y, 0)); 3331OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), _downButton, 1, point.X, point.Y)); 3343OnNodeMouseDoubleClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), _downButton, 2, point.X, point.Y));
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
1238return 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)
785Bounds = new Rectangle(location.X, location.Y, extent.Width, extent.Height); 1125sz.Height = phm.Y;
System\Windows\Forms\Form.cs (5)
929SetDesktopLocation(value.X, value.Y); 1367Location.Y, 3931if (p.Y < screenRect.Y) 3935else if (p.Y + s.Height > screenRect.Y + screenRect.Height) 7079point.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; 1581_splitterRect.Y = Location.Y; 1588_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)
253if (wp.ptMinPosition.Y == -1)
System\Windows\Forms\NotifyIcon.cs (1)
617_contextMenuStrip.ShowInTaskbar(pt.X, pt.Y);
System\Windows\Forms\Printing\PrintPreviewControl.cs (11)
650offset.Y -= Position.Y; 653int borderPixelsY = PhysicalToPixels(Border, _screenDPI.Y); 686int y = offset.Y + borderPixelsY * (row + 1) + lastImageSize.Y; 776new(PixelsToPhysical(pixels.Width, dpi.X), PixelsToPhysical(pixels.Height, dpi.Y)); 782new(PhysicalToPixels(physical.Width, dpi.X), PhysicalToPixels(physical.Height, dpi.Y)); 789_vScrollBar.Value = Math.Clamp(value.Y, _vScrollBar.Minimum, _vScrollBar.Maximum); 943pos = vertical ? locPos.Y : locPos.X; 976pos = vertical ? locPos.Y : locPos.X; 1023pos = locPos.Y; 1041pos = locPos.Y;
System\Windows\Forms\Rendering\ControlPaint.cs (3)
460transform.Translate(scrollOffset.X, scrollOffset.Y); 1863PInvoke.MoveToEx(desktopDC, start.X, start.Y, lppt: null); 1864PInvoke.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); 831SetDisplayRectLocation(scrollLocation.X, scrollLocation.Y); 891yCalc += activeControl.AutoScrollOffset.Y; 1111if (pt.X != 0 || pt.Y != 0)
System\Windows\Forms\ToolTip\ToolTip.cs (16)
1325cursorLocation.Y < rect.top || cursorLocation.Y > rect.bottom) 1340SetTrackPosition(p.X, p.Y); 1415int pointY = r.top + point.Y; 1435int pointY = r.top + point.Y; 1503pointY = optimalPoint.Y; 1942if (moveToLocation.Y + tipSize.Height > screen.WorkingArea.Bottom) 1951moveToLocation.Y, 2011cursorLocation.Y >= r.top && cursorLocation.Y <= r.bottom) 2184wp->y = cursorPos.Y; 2185if (wp->y + wp->cy + currentCursor.Size.Height - currentCursor.HotSpot.Y > screen.WorkingArea.Bottom) 2187wp->y = cursorPos.Y - wp->cy; 2191wp->y = cursorPos.Y + currentCursor.Size.Height - currentCursor.HotSpot.Y; 2209wp->y = tipInfo.Position.Y;
System.Windows.Forms.Design (335)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (3)
252new(middle.X - s_offset2X, middle.Y - 1), 253new(middle.X + s_offset2X + 1, middle.Y - 1), 254new(middle.X, middle.Y + s_offset2Y)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (3)
174_button.Location = new Point(EditRegionLocation.X + EditRegionSize.Width - buttonHeight - EditorLineButtonPadding, EditRegionLocation.Y + EditorLineButtonPadding + 1); 350if (rectScreen.Bottom < (dropDownSize.Height + editorLocation.Y + editorBounds.Height)) 374if (rectScreen.Bottom < (dropDownSize.Height + editorLocation.Y + editorBounds.Height))
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
114EditControl!.Location = new Point(_editRegionLocation.X + GetTextBoxLeftPadding(textBoxPreferredHeight) + 1 + specialPadding, _editRegionLocation.Y + TextBoxLineInnerPadding + 1);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (2)
33FillRectWithCellBounds(cellPt.X, cellPt.Y, ref rect); 43return new Rectangle(pt.X, pt.Y, rect.Width, rect.Height);
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.cs (1)
45int cell = GetCellFromLocationMouse(point.X, point.Y);
System\Drawing\Design\ColorEditor.ColorPalette.cs (15)
180private static int Get1DFrom2D(Point pt) => Get1DFrom2D(pt.X, pt.Y); 219FillRectWithCellBounds(_focus.X, _focus.Y, ref r); 2251 + Get1DFrom2D(_focus.X, _focus.Y)); 276SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 281SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 291SetFocus(_focus with { Y = _focus.Y - 1 }); 294SetFocus(_focus with { Y = _focus.Y + 1 }); 312if (cell2D.X != -1 && cell2D.Y != -1 && cell2D != _focus) 326if (cell2D.X != -1 && cell2D.Y != -1 && cell2D != _focus) 340if (cell2D.X != -1 && cell2D.Y != -1) 343SelectedColor = GetColorFromCell(_focus.X, _focus.Y); 392if (_focus.X == x && _focus.Y == y && Focused) 425int cell = Get1DFrom2D(_focus.X, _focus.Y); 444if (newFocus.Y < 0) 454if (newFocus.Y >= CellsDown)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (3)
133region.Translate(scrollPosition.X, scrollPosition.Y); 150rectangle.Offset(scrollPosition.X, scrollPosition.Y); 320pt.Offset(pt1.X, pt1.Y);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (3)
99if (ProcessMouseMessage(mhs->hwnd, (MessageId)(nuint)wparam, mhs->pt.X, mhs->pt.Y)) 180Message m = Message.Create(hwnd, msg, 0u, PARAM.FromLowHigh(pt.Y, pt.X)); 196if (!adornerWindow.WndProcProxy(ref m, pt.X, pt.Y))
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (3)
179Size delta = new(Math.Abs(mouseLoc.X - InitialDragPoint.X), Math.Abs(mouseLoc.Y - InitialDragPoint.Y)); 184screenLoc.Offset(mouseLoc.X, mouseLoc.Y);
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (1)
161_bounds = (new Rectangle(topRight.X, topRight.Y, GlyphImageOpened.Width, GlyphImageOpened.Height));
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (13)
216controlRect.Y += offset.Y; // offset for non-client area 709if (directionOffset.Y != 0) 714int minRange = directionOffset.Y < 0 ? 0 : currentBounds.Y; 715int maxRange = directionOffset.Y < 0 ? currentBounds.Bottom : int.MaxValue; 716offset.Y = FindSmallestValidDistance(_horizontalSnapLines, _horizontalDistances, minRange, maxRange, directionOffset.Y); 717if (offset.Y != 0) 720IdentifyAndStoreValidLines(_horizontalSnapLines, _horizontalDistances, currentBounds, offset.Y); 721if (directionOffset.Y < 0) 732_cachedDragRect.Offset(offset.X, offset.Y); 739if (offset.Y != 0) 1100_dragOffset = new Point(dragBounds.X - _dragOffset.X, dragBounds.Y - _dragOffset.Y); 1106_targetHorizontalSnapLines[i].AdjustOffset(_dragOffset.Y); 1144Rectangle tempDragRect = new(dragBounds.Left + snapPoint.X, dragBounds.Top + snapPoint.Y, dragBounds.Width, dragBounds.Height);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (22)
143Point controlLocation = new(dragLoc.X - _parentLocation.X, dragLoc.Y - _parentLocation.Y); 147int yDelta = controlLocation.Y % _parentGridSize.Height; 271Point pt = new(dropPoint.X, dropPoint.Y); 276pt.Offset(-ptScroll.X, -ptScroll.Y); 494initialDropPoint.Y + _dragComponents[i].positionOffset.Y); 734mouseLoc.Y - _initialMouseLoc.Y + _dragComponents[_primaryComponentIndex].originalControlLocation.Y); 738Rectangle newRect = new(newPosition.X, newPosition.Y, 771newPosition.Y += _lastSnapOffset.Y; 783mouseLoc.Y - _initialMouseLoc.Y + _originalDragImageLocation.Y); 785newPosition.Y += _lastSnapOffset.Y; 800invalidDragRegion.Translate(mouseLoc.X - _initialMouseLoc.X + _lastSnapOffset.X, mouseLoc.Y - _initialMouseLoc.Y + _lastSnapOffset.Y); 943dragControl.Location.Y - primaryControl.Location.Y); 1028_dragComponents[i].draggedLocation.Y - _dragImageRect.Y,
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (18)
164lines.Add(new SnapLine(SnapLineType.Bottom, loc.Y - 1)); 167lines.Add(new SnapLine(SnapLineType.Horizontal, loc.Y + _primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always)); 172lines.Add(new SnapLine(SnapLineType.Top, loc.Y)); 175lines.Add(new SnapLine(SnapLineType.Horizontal, loc.Y - _primaryControl.Margin.Top, SnapLine.MarginTop, SnapLinePriority.Always)); 276_parentLocation.Y -= control.Location.Y; 482Point mouseLocAbs = new(mouseLoc.X, mouseLoc.Y); 484if (mouseLocAbs.X == _lastMouseAbs.X && mouseLocAbs.Y == _lastMouseAbs.Y) 492if (Math.Abs(_initialPoint.X - mouseLoc.X) > DesignerUtils.MinDragSize.Width / 2 || Math.Abs(_initialPoint.Y - mouseLoc.Y) > DesignerUtils.MinDragSize.Height / 2) 547_lastMouseAbs = new Point(mouseLoc.X, mouseLoc.Y); 611mouseLoc.Y += _lastSnapOffset.Y; 672pixelHeight = mouseLoc.Y - controlBounds.Bottom; 676pixelHeight = AdjustPixelsForIntegralHeight(control, mouseLoc.Y - _initialPoint.Y); 689yOffset = controlBounds.Y - mouseLoc.Y; 693yOffset = AdjustPixelsForIntegralHeight(control, _initialPoint.Y - mouseLoc.Y);
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (2)
250int delta = isColumn ? mouseLoc.X - _lastMouseLoc.X : mouseLoc.Y - _lastMouseLoc.Y;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (9)
145offset.Y = _lastRectangle.Top - mouseLoc.Y; 151offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 167offset.Y = _lastRectangle.Top - mouseLoc.Y; 173offset.Y = _lastRectangle.Bottom - mouseLoc.Y; 216offset.Y = _lastRectangle.Top - mouseLoc.Y; 256ToolboxSnapDragDropEventArgs se = CreateToolboxSnapArgs(e, new Point(e.X - screenOffset.X, e.Y - screenOffset.Y)); 308mouseLoc.Y - DesignerUtils.s_boxImageSize / 2, 318newRectangle.Offset(_lastOffset.X, _lastOffset.Y); 343Rectangle statusRect = new(newRectangle.X - adornerServiceOrigin.X, newRectangle.Y - adornerServiceOrigin.Y, 0, 0);
System\Windows\Forms\Design\CommandSet.cs (43)
813moveOffsetY = snappedOffset.Y; 886moveOffsetY = loc.Y - primaryControl.Location.Y; 1037loc.Y = primaryLocation.Y + primarySize.Height - size.Height; 1045loc.Y = primarySize.Height / 2 + primaryLocation.Y - size.Height / 2; 1078loc.Y = primaryLocation.Y; 1193delta = loc.Y % gridSize.Height; 1298if (loc.Y < top) 1299top = loc.Y; 1302if (loc.Y + size.Height > bottom) 1303bottom = loc.Y + size.Height; 2428loc.Y = (loc.Y / grid.Height) * grid.Height; 2698: (lastSize.Height + lastLoc.Y - curLoc.Y - total) / (selectedObjects.Length - 1); 2828curLoc.Y = lastLoc.Y + lastSize.Height; 2835if (curLoc.Y < primaryLoc.Y) 2836curLoc.Y = primaryLoc.Y; 2841if (curLoc.Y > primaryLoc.Y) 2842curLoc.Y = primaryLoc.Y; 2858curLoc.Y = lastLoc.Y + lastSize.Height + nEqualDelta; 3251if (min.Y > loc.Y) 3253min.Y = loc.Y; 3261if (max.Y < loc.Y + size.Height) 3263max.Y = loc.Y + size.Height; 3273Point offset = new(-min.X, -min.Y); 3288parentOffset.Y -= (max.Y - min.Y) / 2; 3370groupEndY = parentOffset.Y + max.Y - min.Y; 3375groupEndY = parentOffset.Y + gridSize.Height; 3399offset.Offset(parentOffset.X, parentOffset.Y); 3412newLoc.Offset(offset.X, offset.Y); 3469return pLoc.X == qLoc.X ? pLoc.Y - qLoc.Y : pLoc.X - qLoc.X; 3487return pLoc.Y == qLoc.Y ? pLoc.X - qLoc.X : pLoc.Y - qLoc.Y;
System\Windows\Forms\Design\ComponentTray.cs (36)
598SetTrayLocation(comp, new Point(tc.Location.X - _autoScrollPosBeforeDragging.X, tc.Location.Y - _autoScrollPosBeforeDragging.Y)); 602AutoScrollPosition = new Point(-_autoScrollPosBeforeDragging.X, -_autoScrollPosBeforeDragging.Y); 654mcs.ShowContextMenu(MenuCommands.TraySelectionMenu, location.X, location.Y); 658mcs.ShowContextMenu(MenuCommands.ComponentTrayMenu, location.X, location.Y); 979return new Point(loc.X - autoScrollLoc.X, loc.Y - autoScrollLoc.Y); 1191_mouseDragWorkspace.Y = Math.Min(start.Y, end.Y); 1193_mouseDragWorkspace.Height = Math.Abs(end.Y - start.Y); 1326Y = Math.Min(_mouseDragStart.Y, e.Y), 1328Height = Math.Abs(e.Y - _mouseDragStart.Y) 1560location = new Point(location.X + autoScrollLoc.X, location.Y + autoScrollLoc.Y); 1604if (location.X == -1 && location.Y == -1) 1811_whiteSpace.Y = _whiteSpace.Y * 2 + 3; 1817Point newLoc = new(display.X + _whiteSpace.X, display.Y + _whiteSpace.Y); 1829newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 1851newLoc.Y += bounds.Height + _whiteSpace.Y; 1864newLoc = new Point(newLoc.X - autoScrollLoc.X, newLoc.Y - autoScrollLoc.Y); 2179Math.Abs(_mouseDragLast.Y - newPt.Y) < minDrag.Height)) 2198if (_tray._selectionUISvc is not null && _tray._selectionUISvc.BeginDrag(SelectionRules.Visible | SelectionRules.Moveable, _mouseDragLast.X, _mouseDragLast.Y)) 2239mcs.ShowContextMenu(MenuCommands.TraySelectionMenu, location.X, location.Y); 2521if (location.X == -1 && location.Y == -1) 2535pt.Offset(pt1.X, pt1.Y); 2538pt.Offset(Location.X, Location.Y); 2757if (tcLoc1.X == tcLoc2.X && tcLoc1.Y == tcLoc2.Y) 2763if (tcLoc1.Y + height <= tcLoc2.Y) 2769if (tcLoc2.Y + height <= tcLoc1.Y)
System\Windows\Forms\Design\ControlCommandSet.cs (5)
498lines.Add(new SnapLine(SnapLineType.Bottom, pt.Y + primaryControl.Height - 1)); 499lines.Add(new SnapLine(SnapLineType.Horizontal, pt.Y + primaryControl.Height + primaryControl.Margin.Bottom, SnapLine.MarginBottom, SnapLinePriority.Always)); 641primaryControlsize += new Size(snappedOffset.X, snappedOffset.Y); 653moveOffsetY = snappedOffset.Y; 714Rectangle dragRect = new(primaryControl.Location.X, primaryControl.Location.Y,
System\Windows\Forms\Design\ControlDesigner.cs (18)
89loc.Offset(-pt.X, -pt.Y); 99value.Offset(pt.X, pt.Y); 301return new Point(Math.Abs(nativeOffset.X - offset.X), nativeOffset.Y - offset.Y); 1401Math.Abs(_mouseDragLast.Y - y) < minDrag.Height)) 1893if (button == MouseButtons.Left && IsDoubleClick(location.X, location.Y)) 1934mouseHandler.OnMouseDown(Component, button, location.X, location.Y); 1938OnMouseDragBegin(location.X, location.Y); 1948_lastMoveScreenY = location.Y; 1969if (_lastMoveScreenX != location.X || _lastMoveScreenY != location.Y) 1983mouseHandler.OnMouseMove(Component, location.X, location.Y); 1987OnMouseDragMove(location.X, location.Y); 1992_lastMoveScreenY = location.Y; 2085graphics.TranslateTransform(-point.X, -point.Y); 2211bool handled = GetService<ToolStripKeyboardHandlingService>()?.OnContextMenu(location.X, location.Y) ?? false; 2215if (location.X == -1 && location.Y == -1) 2221OnContextMenu(location.X, location.Y); 2400return PARAM.ToInt(pt.X, pt.Y);
System\Windows\Forms\Design\DesignerUtils.cs (2)
574newBounds.Y += e.Offset.Y; // snap to top - so move up our bounds 578newBounds.Y = originalBounds.Y - originalBounds.Height + e.Offset.Y;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (40)
230marginBounds.Offset(offset.X, offset.Y); 231bounds.Offset(offset.X, offset.Y); 450point1.Offset(-offset.X, -offset.Y); 451point2.Offset(-offset.X, -offset.Y); 460_oldPoint1.Y, 462_oldPoint2.Y - _oldPoint1.Y + 1); 484if (Math.Abs(point1.Y - point2.Y) <= MinIBar) 488graphics.DrawLine(pen, point1.X - IBarHalfSize, point1.Y, point1.X + IBarHalfSize, point1.Y); // top hat 489graphics.DrawLine(pen, point2.X - IBarHalfSize, point2.Y, point2.X + IBarHalfSize, point2.Y); // bottom hat 501point1.Y + i, 503point1.Y + i); // top hat 508point2.Y - i, 510point2.Y - i); // bottom hat 514graphics.DrawLine(pen, point1.X, point1.Y, point1.X, point1.Y + IBarHatHeight - 1); // top hat 515graphics.DrawLine(pen, point2.X, point2.Y, point2.X, point2.Y - IBarHatHeight + 1); // bottom hat 518graphics.DrawLine(pen, point1.X, point1.Y + IBarLineOffset, point2.X, point2.Y - IBarLineOffset); 527graphics.DrawLine(pen, point1.X, point1.Y - IBarHalfSize, point1.X, point1.Y + IBarHalfSize); // top hat 528graphics.DrawLine(pen, point2.X, point2.Y - IBarHalfSize, point2.X, point2.Y + IBarHalfSize); // bottom hat 540point1.Y - (IBarHatWidth - 1 - i * 2) / 2, 542point1.Y + (IBarHatWidth - 1 - i * 2) / 2); // left hat 547point2.Y - (IBarHatWidth - 1 - i * 2) / 2, 549point2.Y + (IBarHatWidth - 1 - i * 2) / 2); // right hat 553graphics.DrawLine(pen, point1.X, point1.Y, point1.X + IBarHatHeight - 1, point1.Y); // left hat 554graphics.DrawLine(pen, point2.X, point2.Y, point2.X - IBarHatHeight + 1, point2.Y); // right hat 557graphics.DrawLine(pen, point1.X + IBarLineOffset, point1.Y, point2.X - IBarLineOffset, point2.Y); 848int offset = HorizontalFlow ? controlOffset.Y : controlOffset.X; 856match = (HorizontalFlow && mouseLocation.Y <= offset) || (!HorizontalFlow && mouseLocation.X >= offset); 861match = (HorizontalFlow ? mouseLocation.Y : mouseLocation.X) <= offset;
System\Windows\Forms\Design\OleDragDropHandler.cs (9)
373newRect.Y = oldOffset.Y; 377newRect.Offset(oldOffset.X, oldOffset.Y); 394newRect.Y = newOffset.Y; 398newRect.Offset(newOffset.X, newOffset.Y); 605if ((Dragging && de.X == _dragBase.X && de.Y == _dragBase.Y) || 770bounds.Y = dropPt.Y + pt.Y; 845Rectangle offset = new(de.X - _dragBase.X, de.Y - _dragBase.Y, 0, 0); 968Point newOffset = _forceDrawFrames ? convertedPoint : new Point(de.X - _dragBase.X, de.Y - _dragBase.Y);
System\Windows\Forms\Design\ParentControlDesigner.cs (27)
313displayRectangle.Y += offset.Y; // offset for non-client area 466bounds.Y = location.Y; 491bounds.Y = DefaultControlLocation.Y; 497bounds.Y = selectedControl.Location.Y + GridSize.Height; 581pt.Offset(-ptScroll.X, -ptScroll.Y); // always want to add the control below/right of the AutoScrollPosition 802CreateToolCore(tool, location.X, location.Y, 0, 0, true, false); 926centeredLocation.Y = DefaultControlLocation.Y; 1109if (adjustedRect.Y < minimumLocation.Y) 1111adjustedRect.Y = minimumLocation.Y; 1120Rectangle r = GetUpdatedRect(Rectangle.Empty, new Rectangle(pt.X, pt.Y, 0, 0), false); 1162if (dragRect.Y - updatedRect.Y > halfGrid.Y) 1784offset.Y - _adornerWindowToScreenOffset.Y, 1817Point location = new(baseVar.X, baseVar.Y); 1819_statusCommandUI?.SetStatusInformation(new Rectangle(location.X, location.Y, offset.Width, offset.Height)); 1915_mouseDragOffset.Y = _mouseDragBase.Y; 1917_mouseDragOffset.Height = y - _mouseDragBase.Y; 1933_mouseDragBase.Y - _adornerWindowToScreenOffset.Y, 1934x - _mouseDragBase.X, y - _mouseDragBase.Y); 1937_mouseDragOffset.Height += offset.Y; 1970_mouseDragOffset.Y - _adornerWindowToScreenOffset.Y, 1984oldFrameRect.Y -= _adornerWindowToScreenOffset.Y; 2010_statusCommandUI?.SetStatusInformation(new Rectangle(offset.X, offset.Y, _mouseDragOffset.Width, _mouseDragOffset.Height)); 2185newLoc = new Point(controlLoc.X - parentLoc.X, controlLoc.Y - parentLoc.Y); 2190newLoc = new Point(controlLoc.X + oldParentLoc.X, controlLoc.Y + oldParentLoc.Y);
System\Windows\Forms\Design\ScrollableControlDesigner.cs (1)
33int hitTest = (int)PInvokeCore.SendMessage(f, PInvokeCore.WM_NCHITTEST, 0, PARAM.FromLowHigh(pt.X, pt.Y));
System\Windows\Forms\Design\SelectionUIHandler.cs (3)
413topProp.SetValue(component, adjustedLoc.Y); 417controls[i].Top = adjustedLoc.Y; 618Y = loc.Y;
System\Windows\Forms\Design\SelectionUIService.cs (13)
521if (((ISelectionUIService)this).BeginDrag(rules, anchor.X, anchor.Y)) 565if (((ISelectionUIService)this).BeginDrag(rules, anchor.X, anchor.Y)) 626Math.Abs(screenCoord.Y - _mouseDragAnchor.Y) < minDragSize.Height) 633if (((ISelectionUIService)this).BeginDrag(_dragRules, _mouseDragAnchor.X, _mouseDragAnchor.Y)) 654_mouseDragOffset.Y = screenCoord.Y - _mouseDragAnchor.Y; 674_mouseDragOffset.Y = screenCoord.Y - _mouseDragAnchor.Y; 675_mouseDragOffset.Height = _mouseDragAnchor.Y - screenCoord.Y; 679_mouseDragOffset.Height = screenCoord.Y - _mouseDragAnchor.Y;
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (20)
247if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 252if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 257if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 258&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 266if (pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y) 287Debug.Assert(!(pt.Y >= _outerRect.Y && pt.Y <= _innerRect.Y), "Should be handled by top right check"); 288if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 293if (pt.Y >= _outerRect.Y + (_outerRect.Height - GRABHANDLE_HEIGHT) / 2 294&& pt.Y <= _outerRect.Y + (_outerRect.Height + GRABHANDLE_HEIGHT) / 2) 302if (pt.Y >= _innerRect.Y + _innerRect.Height && pt.Y <= _outerRect.Y + _outerRect.Height) 389if (pt.Y < _outerRect.Y || pt.Y > _outerRect.Y + _outerRect.Height) 396&& pt.Y > _innerRect.Y 397&& pt.Y < _innerRect.Y + _innerRect.Height)
System\Windows\Forms\Design\StatusCommandUI.cs (1)
58bounds.Y = location.Y;
System\Windows\Forms\Design\TabControlDesigner.cs (1)
611y = 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)); 1020if (pos.Y >= bounds.Bottom) 1024else if (pos.Y > bounds.Y) 1029if (pos.Y <= offset + rows[i]) 1264if (dropPoint.Y < 0 || dropPoint.Y >= rows.Length || dropPoint.X < 0 || dropPoint.X >= columns.Length) 1271Control existingControl = ((TableLayoutPanel)Control).GetControlFromPosition(dropPoint.X, dropPoint.Y); 1291_curRow = cell.Y;
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1842if (offset.Y <= parentToolStrip.Items[0].Bounds.Y)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (3)
569if (dragBox != Rectangle.Empty && !dragBox.Contains(mouseLoc.X, mouseLoc.Y)) 979parentDesigner.DragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize); 1002ownerItemDesigner._dragBoxFromMouseDown = _dragBoxFromMouseDown = new Rectangle(new Point(mouseLoc.X - (dragSize.Width / 2), mouseLoc.Y - (dragSize.Height / 2)), dragSize);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (1)
490y = p.Y;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
1343dropDownItem.DropDown.Location = new Point(dropDownItem.DropDown.Location.X + _commitedEditorNode.Bounds.Width - dropDownItem.Bounds.Width, dropDownItem.DropDown.Location.Y);
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 };