更多"有如下事件过程,当同时按下转换键Ctrl和功能键F6时,最后输出的信息"的相关试题:
[单项选择]有如下事件过程,当同时按下转换键Ctrl和功能键F6时,最后输出的信息是( )。
Const ShiftKey=1
Const CtrlKey=2
Const Key_F5=&H74
Const Key_F6=&H75
Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer)
If KeyCode=Key_F5 And Shift=ShiftKey Then
Print"Press Shift+F5"
Elself Key Code=Key_F6 And Shift=CtrlKey Then
Print"Press Ctrl+F6"
End If
End Sub
A. 无任何信息
B. Press Shift+F5
C. Press Ctrl+F6
D. 程序出错
[单项选择]有如下事件过程,当同时按下转换键Ctrl和功能键F6时,最后输出的信息是 Const ShiftKey=1 Const CtrlKey=2 Const Key_F5=&H74 Const Key_F6=&H75 Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) If KeyCode=Key_F5 And Shift=ShiftKey Then Print"Press Shift+F5" Elself Key Code=Key_F6 And Shift=CtrlKey Then Print"Press Ctrl+F6" End If End Sub
A. 无任何信息
B. Press Shift+F5
C. Press Ctrl+F6
D. 程序出错
[单项选择]有如下事件过程,当同时按下转换键Shift和功能键F5时其最后输出的信息是( )。
Const ShiftKey=1
Const CtrlKey=2
Const Key_F5=&H74
Const Key_F6=&H75
Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer)
If KeyCode=Key_F5 And Shift=ShiftKey Then
Print"Press Shift+F5"
ElseIf KeyCode=Key_F6 And Shift=CtrlKey Then
Print"Press Ctrl+F6"
End If
End Sub
A. 无任何信息
B. Press Shift+F5
C. Press Ctrl+F6
D. 程序出错
[单项选择]有如下事件过程,当同时按下转换键Shift和功能键F5时其最后输出的信息是 Const ShiftKey=1 Const CtrlKey=2 Const Key_F5=&H74 Const Key_F6=&H75 Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) If KeyCode=Key_F5 And Shift=ShiftKey Then Print"Press Shift+F5" ElseIf KeyCode=Key_F6 And Shift=CtrlKey Then Print"Press Ctrl+F6" End If End Sub
A. 无任何信息
B. Press Shift+F5
C. Press Ctrl+F6
D. 程序出错
[单项选择]编写如下事件过程和函数过程:
Private Sub Command1_Click( )
Dim num(1 To 6) As Single
num(1)=103: num(2)=190: num(3)=0
hum(4)=32:num(5)=-56: num(6)=100
Print
Print p2(6,num( ))
End Sub
Private Function p2(ByVal n As Integer, number( ) As Single) As Integer
p2=number(1)
For j=2 To n
If number(j)<p2 Then p2=number(j)
Next j
End Function
程序运行后,在窗体上输出( )。
A. -56
B. 0
C. 103
D. 190
[单项选择]编写如下事件过程和函数过程:
Private Sub Form_Chck( )
DimBum(1 To 6)As Single
num(1)=103:num(2)=190:num(3)=0
Bum(4)=32:num(5)=-56:num(6)=100
Print
Pdnt p2(6,hum( ))
End Sub
Private Function p2(ByVal n As Integer,number( )As Single)As Integer
p2=number(1)
Forj=2 Ton
lfnumber(j)<p2 Thenp2=number(j)
Next j
End Function
程序运行后窗体上显示的值是( )。
A. -56
B. 0
C. 103
D. 190
[单项选择]编写如下事件过程:
Option Explicit
Private Sub Form_Click( )
Dim Str As String, I As Integer
Open "examp" For Output As 1
For I=1 To 5
Str=Chr(I+64)
Print #1,Str;
Next I
Close 1
Open”examp’,For lnput AS 2
Str=Input(10,#2)
Print Str;
Close 2
End Sub
程序运行后,单击窗体,则窗体上显示的内容是
A. ABCDE
B. 96
C. 65
D. abcde
[填空题]有如下事件过程:
Private Sub Form Active ( )
Dim Score (1 to 3) As Integer
Dim i As Integer
Dim t As Variant
Fori=3 To 1 step-1
Score (i) = 2 * i
Next
For Each t In Score
Print t
Next
End Sub
程序运行后窗体上显示的值为______。
[单项选择]编写如下事件过程: Private Sub FOrm_ MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then Pint "AAAA" Then End If End Sub Private Sub Form_ MouseUp (Button As Integer, _ Shift As Integer, X As Single, Y As Single) Print "BBBB" End Sub程序运行后,如果在窗体上单击鼠标右键,则输出结果为______ 。
A. AAAA BBBB
B. BBBB
C. AAAA
D. BBBB AAAA
[单项选择]编写如下事件过程: Private Sub Form_ MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single) If Shift = 6 And Button = 2 Then Print “Hello” End If End Sub 程序运行后,为了在窗体上输出“Hello”,应在窗体上执行以下______ 操作。
A. 同时按下Shift键和鼠标左按钮.
B. 同时按下Shift键和鼠标右按钮
C. 同时按下Ctrl、Alt键和鼠标左按钮
D. 同时按下Ctrl、Alt键和鼠标右按钮
[单项选择]编写如下事件过程: Option Base 1 Private Sub Form Click( ) Dim x1( )As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n( )As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是
A. 6
B. 12
C. 24
D. 47
[单项选择]编写如下事件过程:
Private Sub Form KeyDown (KeyCode As Integer, Shift As Integer)
Print Chr (KeyCode)
End Sub
Private Sub Form_KeyPress( KeyAscii As Integer)
Print Chr(KeyAscii)
End Sub
在一般情况下(即不按住Shift键和锁定大写键时)运行程序,若按“T”键,则程序输出的结果是
A. T
B. t
C. T
D. t