|
-
Aug 23rd, 2009, 05:41 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] How to Drag and Drop a control at runtime?
In an application I have a small picture box (picture2) inside a larger picture box (picture1). Pic2 is a colour key to things being shown in the main Pic1.
Depending upon the nature of the current Pic1, I want the user to be able to drag and drop Pic2 to an unimportant section of Pic1 (so as not to obscure significant parts of Pic1, depending on its current content).
Is there please a simple way to implement drag-and-drop at runtime?
I solved the problem in an inelegant manner by writing a routine. I used MOUSEDOWN on the top, bottom or sides of the secondary picture box (Pic2) to prompt a 0.1 sec. timer to amend the TOP and / or LEFT properties of the seconday Picture box to move it in the indicated direction - ie. up/down/left/right.
However, this is not a true Drag-and-Drop process.
I request suggestions as to how this could better be achieved.
camoore
West Wales, UK
Last edited by camoore; Aug 23rd, 2009 at 05:44 PM.
Reason: typo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|