其参数代表什么意思
Form_DragOver(Source As Control, X As Single, Y As Single, State As Integer)

解决方案 »

  1.   

    source:表示你要操作的对象
    x,y:作标
    state:状态
      

  2.   

    X、Y是鼠标托动时光标的位置坐标,State有三个值可取,当为0时,鼠标光标正进入目标对象区域,当为1时,鼠标光标正退出目标对象区域,当为2 时,鼠标光标正位于目标对象的区域之内。
      

  3.   

    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