更新时间:2023-12-06 14:53:34
将$DataGridView_Files_DragOver
和$DataGridView_Files_DragDrop
的定义移到上方的地方你在哪里打电话给他们.现在您在它们尚未定义时使用它们.
Move the definitions for $DataGridView_Files_DragOver
and $DataGridView_Files_DragDrop
above the place where you call on them. Now you are using them when they are not yet defined.
第二次运行代码时,它们是已知的并且功能正常.
The second time the code runs, they are known and the functionality works.
$DataGridView_Files.Enabled = $True
**Here would be a good spot**
$DataGridView_Files.Add_DragDrop($DataGridView_Files_DragDrop)
$DataGridView_Files.Add_DragOver($DataGridView_Files_DragOver)