3DDelfin
like Plinkie said, it wasn't really clear what you are trying to do...
so I took a guess: (that if you are dragging one object, but the mouse moves over another one, you want to swap and start dragging the second object)
https://www.rieperts.com/games/forum/mousedrag.capx
if you have more than one object type then you should put them in a family to keep the code simple.
you can tell what is under the mouse by using Mouse - "Cursor is over"
if you are dragging one object, but then want to switch to another one, they will both be under the mouse, so you need a way to avoid endlessly swapping between the two.
also, if you have many objects on screen, over-lapping, you have to know when it is ok to swap objects, and when to ignore them...
if you meant something completely different, like clicking on an object to drag, but want to change that to a smaller version thumbnail while dragging it, then you wouldn't need all the ignore code...