I'm making a Puzzle program and I now how to move the picture parts with navigation keys but how do I do that using mouse ?
I've tried using this but picture is acting like crazy
Image1->Top=Mouse->CursorPos.x;
Image1->Left=Mouse->CursorPos.y;
Any help?
Edit:
I put this in Timer but Image started blinking in two places at once...
int difference_x=Form1->Image1->Left - Mouse->CursorPos.x;
int difference_y=Form1->Image1->Top - Mouse->CursorPos.y;
int xxx=Mouse->CursorPos.x - difference_x ;
int yyy=Mouse->CursorPos.y - 26 - difference_y;
// 26 is Cursor height
Image1->Top=yyy;
Image1->Left=xxx;