dragging and dropping
dragging and dropping
dragging and dropping
dragging and dropping
dragging and dropping
dragging and dropping dragging and dropping dragging and dropping dragging and dropping dragging and dropping dragging and dropping dragging and dropping dragging and dropping
dragging and dropping dragging and dropping
dragging and dropping
Go Back  Xtreme Visual Basic Talk > > > dragging and dropping


Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2001, 01:34 PM
david369
Guest
 
Posts: n/a
Question dragging and dropping


Does anyone know how you can drag and drop and object to anywhere on the page? If i set dragmode to automatic i can drag it but it drops back to its previous location.


Reply With Quote
  #2  
Old 04-21-2001, 08:55 PM
BillSoo's Avatar
BillSoodragging and dropping BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default Re: dragging and dropping

I think you have to work on the drag-drop event of the form or control on which you drop the object...

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #3  
Old 04-22-2001, 07:23 AM
david369
Guest
 
Posts: n/a
Question Re: dragging and dropping

Is there a command to return the coordinates of the cursor?
For example on the dragdrop event i could have:
label.left=xcursor
label.top=ycursor

Thanks

Reply With Quote
  #4  
Old 04-22-2001, 12:49 PM
BillSoo's Avatar
BillSoodragging and dropping BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default Re: dragging and dropping

The X,Y coordinates are part of the parameters of the dragdrop event.

For instance, I have a form with a label on it. I've set the dragmode of the label to automatic.

In the form dragdrop event I have this code:

Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Label1.Move X, Y
End Sub

Now when I drag the label to a new location, the dragdrop event on the form moves it there.

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
dragging and dropping
dragging and dropping
dragging and dropping dragging and dropping
dragging and dropping
dragging and dropping
dragging and dropping dragging and dropping dragging and dropping dragging and dropping dragging and dropping dragging and dropping dragging and dropping
dragging and dropping
dragging and dropping
 
dragging and dropping
dragging and dropping
 
-->