Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to updated the mousex and mousey
#1
hi,


i need to find a way to updat ethe mousex and mousey for something else with a timer, how do you do that :/

(not just by picscreen_mousemove)


thanks!
Reply
#2
no answere? :/
Reply
#3
can you explain a little more?
Reply
#4
Misunderstood Wrote:can you explain a little more?

alright, i need a lilttle piec eof code that tells a 2 variables where my current x and y is, all the time, even though i dont move my mouse

thanks!
Reply
#5
Are you just talking about the whole form?
Reply
#6
Dark Echo Wrote:Are you just talking about the whole form?


yeah, in frmmirage, all the time i want my mousex and y to be updated in a variable,lets say mousecorx and mousecory, and both will have all the time the mousex and y, even if i dont move my mouse, they will get the positio.


the normal way is:
pic_screenmousemove(something)
then the code for the mousex and y in a variable



thanks
Reply
#7
frmMirage_mousemove(button as integer, shift as integer, x as single, y as single)
miragex = x
miragey = y
end sub

Public miragex as single
Public miragey as single

miragex and miragey will keep your mouse coordantes even if you do not move your mouse, but will change if you change your cursor coordantes.

You don't need a timer because globals do not change unless you ask them to.
Reply
#8
hmm, this doesnt work...i tried the same, but i mean tit like this:


a timer will always calculate on what tile your mouse is right now, so its like the this:

Private Sub picBackSelect_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)


where it gets the x and y automatically when you move, but i want it all the time to calculate the new time


i hope that clears this a lil bit up

thanks!
Reply
#9
So you want to always calculate the new position? Try the GetCursorPos API.
Reply
#10
ya that API works wonders... and I would just like to point out that mesch said tit... haha.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)