CSRLIN returns the number of the row in which the cursor is located.
Syntax:RetVal = CSRLIN Return Value:
Parameters:
|
👉 CSRLIN works only in console mode programs.
POS returns the number of the column in which the cursor is located.
Syntax:RetVal = POS Return Value:
Parameters:
|
👉 POS works only in console mode programs.
CURSORX returns the number of the column in which the cursor is located.
Syntax:RetVal = CURSORX Return Value:
Parameters:
|
👉 CURSORX works only in console mode programs.
CURSORY returns the number of the row in which the cursor is located.
Syntax:RetVal = CURSORY Return Value:
Parameters:
|
👉 CURSORY works only in console mode programs.
MOUSE_CX returns the current mouse X (horizontal, left-right) position, relative to the left edge of the client window.
Syntax:RetVal = MOUSE_CX Return Value:
Parameters:
|
MOUSE_CY returns the current mouse Y (vertical, top-bottom) position, relative to the top edge of the client window.
Syntax:RetVal = MOUSE_CY Return Value:
Parameters:
|
MOUSE_SX returns the current mouse X (horizontal, left-right) position, relative to the left edge of the active screen.
Syntax:RetVal = MOUSE_SX Return Value:
Parameters:
|
MOUSE_SY returns the current mouse Y (vertical, top-bottom) position, relative to the top edge of the active screen.
Syntax:RetVal = MOUSE_SY Return Value:
Parameters:
|
Here is a simple console example:
DO SLEEP(20) LOCATE 1, 1, 0 PRINT SPACE$(80) ' Clear previous display LOCATE 1, 1, 0 PRINT "Client Mouse: "; MOUSE_CX; ", "; MOUSE_CY ' Display client coordinates LOCATE 2, 1, 0 PRINT SPACE$(80) ' Clear previous display LOCATE 2, 1, 0 PRINT "Screen Mouse: "; MOUSE_SX; ", "; MOUSE_SY ' Display screen coordinates LOOP