要求当鼠标在图片框P1中移动时,立即在图片中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是______。
A: Private Sub P1_MouseMove(Button As Integer,Shift As Integer,XAs Single,Y As Single) Print X,Y End Sub
B: Private Sub P1_MouseDown(Button As Integer,Shift As Integer,XAs Single,Y As Single) Picture.Print X,Y End Sub
C: Private Sub P1_MouseMove(Button As Integer,Shift As Integer,XAs Single,Y As Single) P1.Print X,Y End sub
D: Private Sub Form_MouseMove(Button As Integer Shift As Integer,XAs Single,Y As Single) P1.Print X,Y End Sub
A: Private Sub P1_MouseMove(Button As Integer,Shift As Integer,XAs Single,Y As Single) Print X,Y End Sub
B: Private Sub P1_MouseDown(Button As Integer,Shift As Integer,XAs Single,Y As Single) Picture.Print X,Y End Sub
C: Private Sub P1_MouseMove(Button As Integer,Shift As Integer,XAs Single,Y As Single) P1.Print X,Y End sub
D: Private Sub Form_MouseMove(Button As Integer Shift As Integer,XAs Single,Y As Single) P1.Print X,Y End Sub
举一反三
- 执行下列程序后,鼠标单击窗体,输出结果为( )。 Private Sub Form_Click() Print "Click"; End Sub Private Sub Form_MouseDown(Button As Integer, Shift A: As Integer,X As Single,Y As Single) B: Print "Down" C: End Sub D: Private Sub Form_MouseUp(Button As Integer, Shift_As Integer,X As Single,Y As Single) E: Print "Up" F: End SubA) DownUpClick G: B) ClickDownUp H: C) DownClickUp I: D) UpDownClick
- 假定有如下事件过程: Private SubForm_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button=1 Then PopupMenu Popform End If EndSub 则以下描述中错误的是 。
- 运行下面的程序,第二行显示结果是___________。 Private Sub Form_Click() Dim A As Integer Dim i As Integer A = 5 For i = 1 To 9 Call sub1(i, A) Print i, A Next i End Sub Private Sub sub1(x As Integer, y As Integer) Static N As Integer Dim I As Integer For I = 3 To 1 Step -1 N = N + x x = x + 2 Next I y = y + N End Sub
- 设有如下两个过程: Private Sub Form_Click() Dim x!,y! x = 18: y = 10 Call PPP((x), y) Print x,y End Sub Private Sub PPP(a As Single, b As Single) a = a + b Print a,b b = a + b Print a,b End Sub 运行程序后, 则输出结果是________
- 编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 1: y = 1 Do y = x * y If y > 10 Then Print x, y Exit Do Else x = x + 3 End If Loop While x <= 10 End Sub 运行程序,输出结果为______