Link to home
Start Free TrialLog in
Avatar of cc042297
cc042297

asked on

Delphi like drag & drop

Hi,

I would like to make drag & drop work in my app  the same way as in the Delphi IDE:  It  displays a  transparent rectangle which has the size of dragged object, instead of moving the object itself.

Any help is appreciated.

Regards,
CC
Avatar of shaneholmes
shaneholmes

We can give you a better answer, if we knew, First, what are you dragging, second, from what, to what?

Shane
Avatar of cc042297

ASKER

Hi Shane,

It could be anything on the form, a control, a picture, which needs to be draged at runtime. The question is not really about drag & drop mechanism, but about showing a semitransparent dragimage (with the size of the draged object). There is a "Jedi" control which can be moved and resized on the screen at runtime, but it simply moves the control while it is dragged. Because of this it blinks and leaves "footprints"  behind.
SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
correction:

2. If the dragging takes place from another application, you have limited options over the drag shape.

CC,
Are you still with us?
aikimark

Thanx for reminding me! :)

I tried to do it Shane's way. Spent some time on learning how Delphi handles drag and drop. If  I'm not mistaken there is a problem with it. But I’m not sure yet. I didn't want to say anything till I'm not certain.  Right now I have other things to do, but I will be back as soon as I can. :)

Regards,
CC
Well, after checking all avaible Delphi sources I have come to conclusion that it is not possible to dot it by using D&D offered by  Delphi & Windows. The code which displays the Drag image is in Windows and there is no way I can make it work the way I wanted. At least I did not find any. So finally I have built my own Drag&Drop from the bottom. Took me much less time then what I had previously spent on trying to do it the Delphi & Windows way.

I still appreciate your help, so the points will be splitted.

Thanx, CC.
I have come to conclusion -> I have come to the conclusion :)