Trade Knowledge Home -> Trade Question-> Industry >> How to simulate mouse drag and drop?

How to simulate mouse drag and drop?

Users questions:Client area in my program there is a square, you can move it by dragging the mouse position, and now I need to drag and drop in a program to simulate the movement to achieve its position, may I ask how to simulate the mouse to drag? Please heroes help out Xianxie the
Experts answer:lbuttondowrect.ptinrect () if the rect is true in the set bbegindrag mousemove bbegindrag is true if the recalculation of rect to redraw the boundary invalidate lbuttonup in ondraw is false in bbegindrag
  • This information provided by the users.Thanks!