<Window x:Name="TheMainWindow" x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:SRT2Nuendo" mc:Ignorable="d" Title="MyDropTest" Height="500" Width="1000" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowDrop="True" Drop="FileDrop"> <TextBox x:Name="tbSaveCSV" HorizontalContentAlignment="Left" AllowDrop="True" Drop="FileDrop"/> </Window>
Private Sub FileDrop(sender As Object, e As DragEventArgs) If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then Dim DroppedItems As String() = e.Data.GetData(DataFormats.FileDrop) Dim TheFile As String = IO.Path.GetFullPath(DroppedItems(0)) MsgBox (TheFile.Name) End If End Sub
e.Handled = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)