VB 如何把 文件 或 文件夹 通过鼠标拖拽到指定控件上 得到其路径?

2025-01-07 08:26:22
推荐回答(1个)
回答1:

设置窗体OLEDropMode=1

Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
Print Data.Files(1)
End Sub