更多"有如下事件过程,当同时按下转换键Shift和功能键F5时其最后输出的信"的相关试题:
[单项选择]有如下事件过程,当同时按下转换键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. 程序出错
[单项选择]有如下事件过程,当同时按下转换键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. int a[10];
B. int a[2][20];
C. int a[20][ ];
D. iht a[ ];
[单项选择]有如下事件过程,当同时按下转换键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. 程序出错
[单项选择]编写如下事件过程和函数过程:
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 Command1_Click( )
Dim num(1 To 6)As Single
num(1)=103:num(2)=190:num(3)=0
num(4)=32:num(5)=-56:num(6)=100
Print
Print p2(6,num( ))
End Sub
Private Function p2(By Val 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
[单项选择]在键盘上的功能键Alt表示( )键。
A. 换档键
B. 交替换档键
C. 控制键
D. 切换键
[单项选择]编写如下事件过程和函数过程:
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 Activate( )
Dim score(1 To 3) As Integer
Dim i As Integer,t As Variant
For i=3 To 1 Step-l
score(i)=2*i
Next i
For Each t In score
Print t;
Next
End Sub
程序运行后窗体上显示( )。
A. 6 4 2
B. 2 4 6
C. 2
D. 6
[单项选择]编写如下事件过程:
Private Sub Form MouseDown(Button As Integer,Shift As Integer,X As Single,
Y As Single)
If Shift=6 And Button=2 Then
Print "BBBB"
End If
End Sub
程序运行后,为了在窗体上输出“BBBB”,应执行的操作为 ______。
A. 同时按下Shift键和鼠标左键
B. 同时按下Shift键和鼠标右键
C. 同时按下Ctrl、Alt键和鼠标左键
D. 同时按下Ctrl、Alt键和鼠标右键
[填空题]有如下事件过程:
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
程序运行后窗体上显示的值为 【14】 。
[单项选择]编写如下事件过程:
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键和鼠标右按钮