单选题 VB
题号 #151895

对窗体编写如下事件过程: 
Option Base 1 
Private Sub Form_KeyPress(KeyAscii As Integer)  
arr=Array(12, 15, 18, 20, 24)  
m1=arr(1)  
m2=1  
If KeyAscii=12 Then  
For i=2 To 5  
If arr(i) > m1 Then 
m1=arr(i)  
m2=i  
End If  
Next i  
End If  
Print m1  
Print m2  
End Sub 
程序运行之后按回车键,输出结果为(  )。

进入在线模考

参考答案

A

答案解析

暂无解析

你可能感兴趣的试题

A.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _ 
X As Single, Y As Single)  
If Button=2 Then  
PopupMenu mnuEdit, vbPopupMenuCenterAlign Or _  
vbPopupMenuRightButton, X, Y, mnuEditOpen  
End If  
End Sub  
B.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _ 
X As Single, Y As Single)  
If Button=2 Then  
PopupMenu mnuEdit,  
End If  
End Sub  
C.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _ 
X As Single, Y As Single)  
PopupMenu mnuEdit, vbPopupMenuCenterAlign Or _  
vbPopupMenuRightButton  
End Sub  
D.Private Sub Form_MouseUp(Button As Integer , _ 
Shift As Integer, X As Single, Y As Single)  
If Button=2 Then  
PopupMenu mnuEdit, 2  
End If  
End Sub
找试题 · 找答案 · 找资料 在线模考