要求当鼠标在图片框P1中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是( )。

admin2013-11-29  38

问题 要求当鼠标在图片框P1中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是(     )。

选项 A、Private Sub P1_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
    Print X.Y
    End Sub
B、Private Sub P1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
    Picture.Print X.Y
    End Sub
C、Private Sub PI_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
    P1.Print X,Y
    End Sub
D、Private Sub Form—MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
    PI.Print X,Y
    End Sub

答案C

解析 当鼠标在图片框Pl中移动时,就会触发Pl的鼠标移动事件,即P1_MouseMove事件,故排除B选项;鼠标和图片框P1中移动时,立即在图片框中显示鼠标的位置坐标,说明是在图片框中输出数据,所以用Pl的Print语句实现。故C选项正确。
转载请注明原文地址:https://kaotiyun.com/show/eWQp777K
0

最新回复(0)