WWWJax
August 21st, 2001, 04:05 PM
I am attempting to drag a small picture box from a larger Picture box, onto a Form (that contains a .bmp image). Imagine a simple control bar (a large picture box) that contains several picture boxes (icons). This is very similar to the ‘Toolbox’ in VB.
My ‘controls’ are just picture boxes for the time being. They have no real function yet.
I am trying to drag and drop a small picture box onto the form …during RUN time.
During Design time there is no problem of dragging a dropping a picture box anywhere on the form. During RUN time, the smaller picture box can’t be dragged off of the larger picture box, nor can it be dropped elsewhere within the larger picture box. You can see the outline of the ‘attempt’ to drag the picture box to the target location, but when I let go of the mouse button, the picture box jumps back to its original spot.
I have a Drag and Drop event defined in my module. But why do I need to use that? I have checked to make sure the Drag Mode for the small picture box is set to ‘1’. I have checked to make sure that the targets are ‘drop-able’. I have looked up and tried Active X Controls and User Controls, but I run into the same dilemma.
I am hoping there is code out there that simulates a Control Bar whereby the controls (or picture boxes) can be dragged and dropped from their original position. Once the picture box is dropped, I need to copy a new picture box to replace the original one that was moved from the larger picture box onto the form. (Plus, I am not allowed to use the mouse’s ‘right click’/Copy/Paste feature.) Thanks.
<Strong>Wendell W. Wilson</Strong>
<EM>Software Engineer</EM>
St. Petersburg, FL
My ‘controls’ are just picture boxes for the time being. They have no real function yet.
I am trying to drag and drop a small picture box onto the form …during RUN time.
During Design time there is no problem of dragging a dropping a picture box anywhere on the form. During RUN time, the smaller picture box can’t be dragged off of the larger picture box, nor can it be dropped elsewhere within the larger picture box. You can see the outline of the ‘attempt’ to drag the picture box to the target location, but when I let go of the mouse button, the picture box jumps back to its original spot.
I have a Drag and Drop event defined in my module. But why do I need to use that? I have checked to make sure the Drag Mode for the small picture box is set to ‘1’. I have checked to make sure that the targets are ‘drop-able’. I have looked up and tried Active X Controls and User Controls, but I run into the same dilemma.
I am hoping there is code out there that simulates a Control Bar whereby the controls (or picture boxes) can be dragged and dropped from their original position. Once the picture box is dropped, I need to copy a new picture box to replace the original one that was moved from the larger picture box onto the form. (Plus, I am not allowed to use the mouse’s ‘right click’/Copy/Paste feature.) Thanks.
<Strong>Wendell W. Wilson</Strong>
<EM>Software Engineer</EM>
St. Petersburg, FL