drag and drop problem 
Author Message
 drag and drop problem

Hi,

first time using drag and drop.  I  have a list box with a selection of
files.  I want to be able to select a file and drop it onto a picture
box.  Dropping it is not the problem.  I using the mousedown
event to put the dragmode to automatic.  But once I set it to that
neither mousedown or up event will trigger.  It remains in dragmode
which means that I can't scroll or do anything with the list box.

Have anybody some sample code that I could like at?
Which events would I been using and in which order.

Thanking you in advance,
Jim Barrett



Sun, 05 Aug 2001 03:00:00 GMT  
 drag and drop problem

Quote:

>Hi,

>first time using drag and drop.  I  have a list box with a selection of
>files.  I want to be able to select a file and drop it onto a picture
>box.  Dropping it is not the problem.  I using the mousedown
>event to put the dragmode to automatic.  But once I set it to that

No good.  First of all, the mousemove is where you detect a drag (I am not
sure why so many people are drawn to the mousedown event for this.)
Second, you do not set the dragmode property, you initiate a drag with the
Drag method.

Quote:
>neither mousedown or up event will trigger.  It remains in dragmode
>which means that I can't scroll or do anything with the list box.

Use the list's DragOver event for this.

Quote:

>Have anybody some sample code that I could like at?
>Which events would I been using and in which order.

The list's DragDrop event will fire when the file is dropped.
Quote:

>Thanking you in advance,
>Jim Barrett



Sun, 05 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. drag n drop problem

2. Treeview and OLE Drag -n- Drop problem

3. Drag and Drop problem ?

4. Drag and drop problems

5. Drag and Drop Problem

6. Drag-and-drop problem

7. ListView Drag&Drop Problem

8. ListView Drag and Drop problem in icon view

9. TreeView Drag&Drop problems

10. Drag and Drop Problem

11. Drop and Drag Problem and Deployment Problem in VB 50 Enterprise

12. OLE DROP AND DRAG PROBLEM AND DEPLOYMENT PROBLEM

 

 
Powered by phpBB® Forum Software