dragover是对控件进行拖放产生的事件 举个例子 新建一个工程,放两个textbox,名称为text1,text2。将text1的DragMode设置为Auto 代码 Private Sub Text2_DragOver(Source As Control, X As Single, Y As Single, State As Integer) Debug.Print "text2_dragover occurs" Debug.Print "Source is ", Source.Name Debug.Print "Sourcce is: " If State = 0 Then Debug.Print "Entering" ElseIf State = 1 Then Debug.Print "Leving" ElseIf State = 2 Then Debug.Print "Over" End If End Sub
x,y:作标
state:状态
举个例子
新建一个工程,放两个textbox,名称为text1,text2。将text1的DragMode设置为Auto
代码
Private Sub Text2_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
Debug.Print "text2_dragover occurs"
Debug.Print "Source is ", Source.Name
Debug.Print "Sourcce is: "
If State = 0 Then
Debug.Print "Entering"
ElseIf State = 1 Then
Debug.Print "Leving"
ElseIf State = 2 Then
Debug.Print "Over"
End If
End Sub