且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获取文件拖到Windows窗体窗体中的路径

更新时间:2023-12-06 09:18:22

您可以捕获DragDrop事件并从那里获取文件。一些东西:

You can catch the DragDrop event and get the files from there. Something like:

void Form_DragDrop(object sender, DragEventArgs e)
{
    string[] FileList = (string[])e.Data.GetData(DataFormats.FileDrop, false);

    //more processing
}