![]() |
how to updated the mousex and mousey - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: how to updated the mousex and mousey (/showthread.php?tid=202) |
how to updated the mousex and mousey - Gilgamesch - 24-07-2006 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! - Gilgamesch - 25-07-2006 no answere? :/ - Misunderstood - 25-07-2006 can you explain a little more? - Gilgamesch - 25-07-2006 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! - Dark Echo - 26-07-2006 Are you just talking about the whole form? - Gilgamesch - 26-07-2006 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 - Robin - 26-07-2006 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. - Gilgamesch - 28-07-2006 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! - Spodi - 28-07-2006 So you want to always calculate the new position? Try the GetCursorPos API. - Forgotten - 28-07-2006 ya that API works wonders... and I would just like to point out that mesch said tit... haha. |