Is there any reason why UserControl_OLEStartDrag doesn't raise the StartDrag event when set to Automatic?
Ideally I'd like to set some drag data when the drag starts.
Code:
'//// standard OLE event
Private Sub UserControl_OLEStartDrag(Data As DataObject, AllowedEffects As Long)
Data.Clear
If Me.OLEDragMode = vbOLEDragAutomatic Then
If modCommon.SaveImage(m_Image, Data, lvicSaveAsCurrentFormat) Then
AllowedEffects = vbDropEffectCopy
Else
AllowedEffects = vbDropEffectNone
End If
Else
RaiseEvent OLEStartDrag(Data, AllowedEffects)
' if user doesn't set AllowedEffects, VB will cancel drag event
End If
End Sub