쉬우면서도 찾기 힘들었던...
private void fileSelector_DragDrop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop, false))
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
{
if (e.Data.GetDataPresent(DataFormats.FileDrop, false))
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
FileInfo _fi = new FileInfo(files[0]);
if (_fi.Exists)
{
if (_fi.Extension.ToLower() == ".[ExtentionName]")
{
fi = _fi;
tbxFileName.Text = _fi.FullName;
}
}
}
}
private void fileSelector_DragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.All;
}