For the last several days, I've been trying to test mouse movement on my laptop.
I have been using the mouse.prg that is in the \harbour\tests\ sub-dir.
I can (supposedly) move the mouse cursor programmatically around the screen by the function mSetPos(nrow,nCol). When I exercise this command the functions mrow(), and mcol() react correctly and the mouse cursor position is supposedly moved. (A fragment of the test proggie is shown below)
However, I see *no* movement of the cursor on my screen ??? Am I misunderstanding this test ?
Because I have disabled my touchpad, and use a USB-connected Mouse, could this disrupt this test ??
Thanks for any help offered.
PROCEDURE Main()
LOCAL lSavMCursor,lNewMCursor
LOCAL nR := 5, nC := 38
LOCAL nMROW,nMCOL
setmode(25,80)
SET(_SET_EVENTMASK,INKEY_ALL)
SET CURSOR OFF
CLS
IF ! MPresent()
? " No mouse present !"
QUIT
ENDIF
lSavMCursor := MSETCURSOR(.T.)
@ 0, 0 TO MaxRow(), MaxCol() DOUBLE
@ MaxRow() - 2, 0 TO MaxRow(), 18 DOUBLE
@ MaxRow() - 1, 2 SAY "Y:"
@ MaxRow() - 1, 10 SAY "X:"
@ nR, 2 SAY "Mouse Type :"
@ nR, 18 SAY "Mouse System"
@ MaxRow() - 2, 68 TO MaxRow(), MaxCol() DOUBLE
@ MaxRow() - 1, 70 SAY "Exit"
@ 10, 2 SAY " -- Checking --"
@ 11, 2 SAY "Window Boundaries :"
@ 12, 2 SAY "Press/Release But.:"
@ 13, 2 SAY "Double Click Left :"
@ 14, 2 SAY "Double Click Right:"
mSetPos(maxrow()-3,20)
nMROW := MROW()
nMCOL := MCOL()
MUPDATE()
// at this point I see the Mouse position has been updated at
// the bottom left of the screen, but
// my mouse cursor has *not* moved.
// Why is this please ??
inkey(0)
SET CURSOR ON
RETURN
STATIC FUNCTION MUPDATE()
@ MaxRow() - 1, 4 SAY MRow() PICTURE "9999"
@ MaxRow() - 1, 12 SAY MCol() PICTURE "9999"
RETURN 0