View Single Post
 
Old 04-30-2004, 10:33 AM
Iceplug's Avatar
Iceplug Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Smile Dragging and Dropping with VB.NET

Dragging and Dropping controls on a form!
Check out the attached solution:

Main points:
Set your destination's .AllowDrop to True
In your source's Mousedown, call its .DoDragDrop event.
In the destination's .DragEnter event, check for .GetDataPresent and set the e.Effect.
In the .DragDrop event, it is done!

In the attached solution:
Throw an ant into a timeless vortex!

Edit: You also might notice that the .DoDragDrop event pauses execution.
Attached Files
File Type: zip DragDrop.zip (9.2 KB, 825 views)
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!

Last edited by Iceplug; 05-03-2004 at 04:55 PM.
Reply With Quote