Unicode Controls & Classes for VB6 - Version 4

ctlUniGrid.GetCellRectByCoords Method

Finds the cell on the given coordinates and returns the cell rectangle

Syntax
Public Sub GetCellRectByCoords (ByVal x As Long, _
ByVal y As Long, _
ByRef X1 As Long, _
ByRef y1 As Long, _
ByRef X2 As Long, _
ByRef y2 As Long)
Parameters
Parameter Description
ByVal x As Long The X coordinate
ByVal y As Long The Y cooridnate
ByRef X1 As Long (OUT) Left coordinate
ByRef y1 As Long (OUT) Top coordinate
ByRef X2 As Long (OUT) Right coordinate
ByRef y2 As Long (OUT) Bottom coordinate
Remarks
The returned coordinates are relative to the visible viewport (so you can pass the coordinates directly from the MouseMove, MouseDown and MouseUp events without changes)