howtothings.co.uk
[VB.NET] Drag & Drop on Textbox - Printable Version

+- howtothings.co.uk (https://www.howtothings.co.uk)
+-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4)
+--- Forum: Programming Support, Graphic Design and Tutorials (https://www.howtothings.co.uk/forumdisplay.php?fid=14)
+--- Thread: [VB.NET] Drag & Drop on Textbox (/showthread.php?tid=1118)



[VB.NET] Drag & Drop on Textbox - Clones - 11-11-2011

[Image: 70e3a2ef99.gif]

How to do it?

[Image: 36f9fe768b.png]

1)Enable AllowDrop Property of the textbox.

2)Put the following code in DragOver Event of the textbox:

Code:
If e.Data.GetDataPresent(DataFormats.FileDrop) Then e.Effect = DragDropEffects.Copy

3)Put the Following code in DragDrop Event of the Textbox:

Code:
Dim data As Array = DirectCast(e.Data.GetData(DataFormats.FileDrop), Array)
Textbox1.Text = data.GetValue(0).ToString



RE: [VB.NET] Drag & Drop on Textbox - Drumm - 11-11-2011

How do I do this on Linux?