|
-
Jun 2nd, 2007, 03:31 PM
#1
Thread Starter
New Member
Problem with the OLEDragDrop Event of a UserControl
Dear Friends
I´m creating an application where I was using an array of buttons which could be moved inside a PictureBox.
This was made using the OLE Drag&Drop features of VB, and it was working just fine.
But then, I needed something a little more sophisticated than a simple button, and the solution was to create my own UserControl.
With the Command Button, I had an OLEDragDrop event that had these four arguments:
Private Sub cmd_OLEDragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
Index
Source
X
Y
In my usercontrol, I have mapped the OLEDragDrop RaiseEvent to the usercontrol OLEDragDrop event member.
And now, the OLEDragDrop has these arguments:
Private Sub cmd_OLEDragDrop(Index As Integer, Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
Index
Data
Effect
Button
Shift
X
Y
And this is the problem, because I needed the Source argument, and besides, I don´t even know how to fire this event anymore.
Is there a way to create an OLEDragDrop event on a usercontrol that behaves just like the one in a command button?
I´m lost in the desert with this problem, and any help will be of great value for me.
Thanks in advance.
Edit/Delete Message
-
Jun 3rd, 2007, 12:56 AM
#2
Re: Problem with the OLEDragDrop Event of a UserControl
Are you sure you posted that correctly?
This code
cmd_OLEDragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
is the event signature for a DragDrop event not the OLEDragDrop event.
-
Jun 3rd, 2007, 05:53 AM
#3
Thread Starter
New Member
Re: Problem with the OLEDragDrop Event of a UserControl
Hey, thanks a lot
That´s it.
Some times we stick to one idea so hardly, and all it´s needed is someone else´s fresh mind to see our mistakes.
I was so sure that this was an OLE thing, that I, not even for a second, considered verifying that point.
Thanks a lot one more time.
You really saved my day.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|