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

admin2010-04-10  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_M0useDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
Picture.Print X,Y
End Sub
C、Private Sub P1_MouscMove(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)
P1.Print X.Y   
End Sub

答案C

解析 鼠标在图片框中移动,对象应为图片框控件,而不是窗体,选项D)是错误的;鼠标移动触发的是MouseMove事件,选项B)是错误的;在图片框内显示坐标,Print的对象名为图片框,如果没有对象名,则默认输出到窗体上,所以正确的答案为C)。
转载请注明原文地址:https://jikaoti.com/ti/ZJg0FFFM
0

最新回复(0)