柠檬试题库
search
首页 计算机 公务员 驾照 关于

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


  • A.Private Sub P1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Print X, YEnd Sub
  • B.Private Sub P1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)Picture.Print X, YEnd Sub
  • C.Private Sub P1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)P1.Print X, YEnd Sub
  • D.Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)P1.Print X, YEnd Sub
热度🔥330
参考答案:C
解析:

【解析】当鼠标在图片框P1中移动时,就会触发P1的鼠标移动事件,即P1_MouseMove事件,故排除B选项;鼠标在图片框P1中移动时,立即在图片框中显示鼠标的位置坐标,说明是在图片框上输出数据,所以用P1的Print语句实现。故C选项正确。
复制题目向AI提问