G
Griff
Using VS2008/VBasic/WPF Application
I have a text box and wish to drap a file onto it from the file system
(explorer). I've tried to mimic what worked in VS2005 (Windows forms) and I
can't get it to work....when I drag the file onto the TextBox I get the "not
allowed" mouse symbol (a circle with a line through it).
The textbox has the AllowDrop property set to TRUE
The textbox's DragEnter() event has the following code:
If e.Data.GetDataPresent(DataFormats.FileDrop, False) Then
e.Effects = DragDropEffects.All
End If
And the textbox's Drop() event [VS2005 I used the DragDrop() event] has this
code (snippet):
Dim sData() As String = CType(e.Data.GetData(DataFormats.FileDrop),
String())
Neither event appears to fire though.
Any suggestions would be most welcome
Many thanks
Griff
I have a text box and wish to drap a file onto it from the file system
(explorer). I've tried to mimic what worked in VS2005 (Windows forms) and I
can't get it to work....when I drag the file onto the TextBox I get the "not
allowed" mouse symbol (a circle with a line through it).
The textbox has the AllowDrop property set to TRUE
The textbox's DragEnter() event has the following code:
If e.Data.GetDataPresent(DataFormats.FileDrop, False) Then
e.Effects = DragDropEffects.All
End If
And the textbox's Drop() event [VS2005 I used the DragDrop() event] has this
code (snippet):
Dim sData() As String = CType(e.Data.GetData(DataFormats.FileDrop),
String())
Neither event appears to fire though.
Any suggestions would be most welcome
Many thanks
Griff