You can't enable dragging of a TImage at run-time that I know of. You have to write the code yourself (which is basically an OnMouseDown/OnMouseMove functionality where you simply change the left and top values of the TImage when the mouse moves while a button is down.)
In C++ Builder, BeginDrag and EndDrag are methods used for drag and drop/dock operations only. As I explained above, the quickest way to draw the image is to use it's own OnMouseDown/OnMouseMove events to move it. You could get more complicated and draw it on a canvas that doesn't move, which would make it faster (if you needed), but I don't recommend that unless you just have to.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.