Drag and Drop onto a Control Array? 
Author Message
 Drag and Drop onto a Control Array?

Hi, all.

I'm trying to find a way to allow users to drag image controls onto a
larger picture box to draw something.  The larger picture box has twelve
"drop zones" represented by a second set of image controls that I have
created as a control array.

I tried to write a simple DragDrop procedure where the control array
determines which of its elements got dropped on and then moves the source
image control to that location.

It looks like this:

Private Sub DropZone_DragDrop(Source As Control, X As Single, Y As Single)
    If Index < 6 Then
    Source.Move 4890, ((Index * 735) + 90)
    Source.Move 8340, (((Index - 5) * 735) + 90)
    End If
    Source.Visible = True
End Sub

However, it gives me the following error when I try to run the

"Event procedure does not match description of event having the same

                        I'm confused.  Any clues?


Fri, 12 Feb 1999 03:00:00 GMT  
 Drag and Drop onto a Control Array?


>Private Sub DropZone_DragDrop(Source As Control, X As Single, Y As Single)

Private Sub DropZone_DragDrop(Index As Integer, Source As Control, X..

you need the "Index As Integer," for an array

Sat, 13 Feb 1999 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Drag Drop text fragment onto another control

2. : Drag/Drop onto other controls

3. Drag and Drop onto Picture box in user control

4. dragging and dropping onto user control

5. drag-and-drop from Data Environment designer onto custom control

6. Drag and drop contact onto Word VBA userform

7. Drag & drop file onto ListViewItem function

8. drag-dropping a treeview node onto a datagrid

9. Drag N Drop onto an exe?

10. drag and drop onto the system tray

11. Drag FILENAME from explorer and DROP onto VB form

12. Drag/drop onto the desktop


Powered by phpBB® Forum Software