执行下列程序后,鼠标单击窗体,输出结果为( )。 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
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
举一反三
- 要求当鼠标在图片框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
- 阅读下面程序。 Private Function a(load As Integer) As Single If load < 20 then money=load / 2 else money=20+load end if a=money End Function Private Sub Form Click() Dim load As Integer,fee As Single Load=InputBox("请输入一个数:") Fee=a(load) Print fee End Sub 输入20,运行后的输出结果是 【13】 。
- 设有如下两个过程: 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 运行程序后, 则输出结果是________
- 下列程序执行后,在窗体上按下Alt+Ctrl+A键的输出结果为______。 Private Sub Form_KeyDown(Keycode As Integer, Shift As Integer) Print shift End Sub
- 在窗体上画一个文本框,其名称为Text1,然后编写如下过程: Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) Print Chr(KeyCode) End Sub Private Sub Text1_KeyUp(KeyCode As Integer, Shift As integer) Print Chr(KeyCode+2) End Sub 程序运行后,把焦点移到文本框中,此时如果敲击“A”键,则输出结果为 A: A B: A C: A D: B E: A F: C G: A H: D