|
-
May 28th, 2003, 06:15 PM
#1
Thread Starter
New Member
OLEDragDrop Button Parameter.... empty
I'm getting no value for the OLEDragDrop button param on my listview. Any suggestions?
(I've tried it compiled as well, same result. DragOver DOES give correct button values, so I could 'kludge' a global var and save the button state from DragOver, but . . . thats a bit ugly, isnt it?, especially when Button is supposed to be passed into my event handler.)
To reproduce:
Create project, add listview to form, set its drop mode to manual.
Add following code to form:
Code:
Option Explicit
Private Sub ListView1_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, _
Button As Integer, Shift As Integer, x As Single, y As Single)
Dim Action As String
If Shift And vbCtrlMask Then
' Copy
Effect = vbDropEffectCopy And Effect
Action = "Copy"
Else
' Move
Effect = vbDropEffectMove And Effect
Action = "Move"
End If
If Button And vbRightButton Then
'Display Popup menu
'With correct action highlighted
Action = "Prompt to " & Action
End If
Debug.Print Action
End Sub
One additional question: When dragging a file from explorer, to drop on another app, explorer shows the icon as a graphic of the filename, as soon as the cursor enters my app, the icon switches to a wrather dull generic cursor. Is there a way to get a handle on the original cursor, and use it?
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
|