3 月
28
28
winform 用拖拉方式 上傳檔案
- 將Form的 AllowDrop 屬性設為 true
- 在 Form 的 DragEnter 事件中
- e.Effect = DragDropEffects.Copy;
- 在Form的 DragDrop 事件中
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
MessageBox.Show(files[0].ToString());
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
MessageBox.Show(files[0].ToString());
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
There are no comments.