单选题在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是 A.Private SubText1_KeyPress(KeyAscii As Integer) If KeyAscii<65 or KeyAscii>90 Then MsgBox“请输入大写字母” KeyAscii=0 End If End Sub B. Private Sub Text1_KeyDown( KeyCode As Integer,Shift As Integer) If KeyCode < 65 or KeyCode > 90 Then Msgbox“请输入大写字母” KeyCode = 0 End If End Sub C. Private SuB Text1_MouseDown( Button AS Integer,_ Shift As lnteger,X As Single,Y As Single) If Asc ( Text1. Text) < 65 or Asc ( Text1.Text) > 90 Then Msgbox“请输入大写字母” End If End Sub D. Private Sub Text1_Change( ) If Asc(Text1.Text) >64 And Asc(Text1.Text) >9l Then Msgbox“请输入大写字母” End lf End Sub
单选题在窗体上画一个文本框(名称为Text1)和一个标签(名称为Label1),程序运行后,在文本框中每输入一个字符,都会立即在标签中显示文本框中字符的个数。以下可以实现上述操作的事件过程是______。 A) Private Sub Text1 Click() Label1.Caption=Len(Text1.Text) End Sub B) Private Sub Text1_Change() Label1.Caption=Str(Len (Text1.Text)) End Sub C) Private Sub Text1 Change() Label1.Caption=Str(Text1.Text) End Sub D) Private Sub Label1_Change() Label1.Caption=Str(Len(Text1.Text)) End Sub
单选题关于随机文件,以下叙述中错误的是
单选题若程序中有语句:y = proc(6),则proc 应该是
单选题文本框的Scroll Bars属性设置为非零值,却没有效果,原因是( )。
单选题单击命令按钮时,下列程序的执行结果是( )。
Private Sub Command1_Click()
Dim a As Integer,b As Integer,C As Integer
a=3
b=4
c=5
Print SecProc(c,b,a)
End Sub
Function FirProc (x As Integer,y As Integer,z As Integer)
FirProc=2 * x + y + 3 * z+2
End Function
Function SecProc (x As Integer,y As hteger,z As Integer)
SecProc=FirProc(z,x,y)+x+7
End Function
单选题以下叙述中错误的是
单选题有数据定义语句:Dim a,b As Integer Dim x%,y as Integer执行语句后,不是整型变量的是
单选题以下过程的功能是从数组中寻找最大值: Pfivate Sub FindMax(a() As Integer,ByRef Max As Integer) Dim S As Integer,f As Integer:Dim i As Integer s=LBound(a):f=UBound(a) Max=a(s) For i=S To f Ifa(i)>Max Then Max=a(i) Next End Sub 以下关于上述过程的叙述中,错误的是
单选题若组合框Combol中有3个项目,则以下能删除其最后一项的语句是( )。
单选题双击窗体中的对象后,VisualBasic显示的窗口是( )。
单选题在窗体上画两个文本框,其名称分别为Text1和Text2,然后编写如下程序: Private Sub
Form_Load() Show Text1.Text="'
Text2.Text="' Text1.SetFocus End
Sub Private Sub Text1_Change()
Text2.Text=Mid(Text1.Text,6) End Sub
程序运行后,如果在文本框Text1中输入ChinaBeijing,则在文本框Text2中显示的内容是______,
A.ChinaBeijing
B.China
C.Beijing
D.ChinaB
单选题已知“a=10,r=6,x=7,b=True”,表达式“a>=2*3.14159*r And x<>5 Or Not b”的值为______。
单选题现有如下一段程序:Private Sub
Command1_Click() x=UCase(InputBox("输入:")) Select Case x Case
"A" To "C" Print "考核通过!" Case "D" Print
"考核不通过!" Case Else Print "输入数据不合法!" End SelectEnd
Sub执行程序,在输入框中输入字母"B",则以下叙述中正确的是______。
A.程序运行错
B.在窗体上显示"考核通过!"
C.在窗体上显示"考核不通过!"
D.在窗体上显示"输入数据不合法!"
单选题如果x是一个正的实数,将千分位四舍五入,保留两位小数的表达式是( )。 A.0.01*Int(X+0.05) B.0.01*Int((X+0.005)*100) C.0.01*Int(100*(X+0.05)) D.0.01*Int(X+0.005)
单选题求1!+2!+…+10!的程序如下:
Private Function s(x As Integer)
f=1
For i=1 To x
f=f*i
Next
s=f
End Function
Private Sub Command1_Click()
Dim i As Integer
Dim y As Long
For i=1 To 10
______
Next
Print y
End Sub
为实现功能要求,程序的括号中应该填入的内容是______。
单选题在面向对象的程序设计中,可被对象识别的动作称为
单选题请阅读程序:
Sub subP(b()As Integer)
For i=1 To 4
b(i)=2*i
Next i
End Sub
Private Sub Command 1_Click()
Dim a(l To 4)As Integer
A(l)=5:a(2)=6:a(3)=7:a(4)=8
subP a()
For i=1 To 4
Print a(i)
Next i
End Sub
运行上面的程序,单击命令按钮,则输出结果是
单选题以下叙述中错误的是
单选题假定有如下的程序段:Dim intVarAs Integer intvar=True Print intVar则输出结果是
