using a toolstrip-button as drag&drop target

G

Guest

Hi folks,

I've got a prob in using a toolstripbutton as a target of a d&d-operation. I
set AllowDrop=true in the formload event, an handle the dragenter event like
this one:

Private Sub Dragenters(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs)
If e.Data.GetDataPresent(DataFormats.Text) Then
e.Effect = DragDropEffects.All
Else
e.Effect = DragDropEffects.None
End If
End Sub

This handles several controls-dragenter event and it is fired as expected.
But unlike every other control the toolstripbuttons don't react correctly:
the cursor doesnt change, nor does the dragdrop event occur. A nearby
toolstriptextbox works and when the drag-path leads through it, the
dragdrop-event of the buttons is fired! So it seems as if the
e.effect-setting isn't received by the d&d-op itself, when set by
toolstripbuttons-dragenter event.
So, is there any chance to drop data on toolstripbuttons, without having to
enter a nearby control first?

Thanx for any help or hint

Volker
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top