Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where is my mistake using _mousemovement keywords?
#1
Hi Qb64pe community

I'm in trouble with a fine couple of QB64 keywords:  _MousemovementX & _MousemovementY

I think that the issue is raising from my bad code or bad knowledge about these two useful keywords...

here the first example taken from the wiki
mousemovementX wiki
mousemovementY wiki
Code: (Select All)
Rem _MOUSEMOVEMENTX / _MOUSEMOVEMENTY  STUDY

Rem example 1 from wiki
Screen 12
PX = 320: PY = 240 'center position
_MouseMove PX, PY ' set center of screen, pointer of mouse and center of circle at the same position
Do: _Limit 200
    Do While _MouseInput
        PX = PX + _MouseMovementX
        PY = PY + _MouseMovementY
    Loop
    Cls
    Circle (PX, PY), 10, 10
    Locate 1, 1: Print PX, PY
Loop Until InKey$ = Chr$(27) 'escape key exit
as you can see my adds are:
- the 2 REM lines 
- and the _MouseMove PX,PY line of code.
The issue, that I am not able to correct, comes out if you play moving the pointer of mouse some times along the horizonthal and vertical axis of the screen.

Can someone give me a feedback or an enlightment about this?
Reply


Messages In This Thread
Where is my mistake using _mousemovement keywords? - by TempodiBasic - 09-17-2023, 06:46 PM



Users browsing this thread: 4 Guest(s)