Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is _MOUSEMOVEMENTY and _MOUSEMOVEMENTX supposed to act this way?
#3
Very difficult for me to imagine a practical use for this keyword set. Since the difference is very little at the start, but multiplies the longer you use it, I also find it difficult to understand why the developers didn't sync it with the mouse pointer.

So unfortunately we have nothing in QB64 to locate the mouse cursor outside of the program window in the same y, x coordinates that _SCREENCLICK would be assigned to.

If it wasn't for Windows API, I'd have to do a hack where I build a transparent window over the desktop to accomplish this, but since Steve appointed me as the official API Princess, I'll go with this...

Code: (Select All)
REDIM Hold AS POINTAPI
TYPE POINTAPI
    X_Pos AS LONG
    Y_Pos AS LONG
END TYPE

DECLARE DYNAMIC LIBRARY "user32"
    FUNCTION GetCursorPos (lpPoint AS POINTAPI)
END DECLARE

DO
    _LIMIT 30
    z = GetCursorPos(Hold)
    LOCATE 1, 1: PRINT "Col ="; Hold.X_Pos;: LOCATE 1, 11 + 1: PRINT "Row ="; Hold.Y_Pos; "   ";
    IF LEN(INKEY$) THEN
        EXIT DO
    END IF
LOOP
END

Pete
Reply


Messages In This Thread
RE: Is _MOUSEMOVEY and _MOUSEMOVEX supposed to act this way? - by Pete - 11-01-2022, 04:40 AM



Users browsing this thread: 5 Guest(s)