首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

设有以下窗体单击事件过程:Private Sub Form_Click()a=1For i=1 To 3Select Case i Case 1,3

设有以下窗体单击事件过程:

Private Sub Form_Click()

a=1

For i=1 To 3

Select Case i

Case 1,3

a=a+1

Case 2,4

a=a+2

End Select

Next i

MsgBox a

End Sub

打开窗体运行后,单击窗体消息框的输出内容应为【 】。

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“设有以下窗体单击事件过程:Private Sub Form_…”相关的问题
第1题
设有如下窗体单击事件过程: Private Sub Fom_Click. a =1 For i –To3 Select Case i Case 1
,3 a =a +1 Case2,4 a =a +2 End Select Next i MsgBox a End Sub 打开窗体运行后,单击窗体,则消息框的输出的结果是 A.3 B.4 C.5 D.6

点击查看答案
第2题
设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:Private Sub Command1_Click() S

设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:

Private Sub Command1_Click()

Static x as integer

X=f(x+5)

Cls

Print x

End Sub

Private function f(x as integer)as integer

F=x+x

End function

连续单击命令按钮3次,第3次单击命令按钮后,窗体上显示的计算结果是

A)10

B)30

C)60

D)70

点击查看答案
第3题
若有以下窗体单击事件过程:Private SubForm_Click()result=1For i=1To 6 Step 3result=result*

若有以下窗体单击事件过程:Private SubForm_Click()

result=1

For i=1To 6 Step 3

result=result*i

Next i

MsgBoxresult

End Sub打开窗体运行后,单击窗体,则消息框的输出内容是()。

A.1

B.4

C.15

D.120

点击查看答案
第4题
设有如下通用过程:Public Function f(x As Integer) Dim y As Integer x=20y=2 f=x*yEnd Functio

设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程; Private Sub Command1_Click() Static x As Integer x=10 y=5 y=f(x) Print x;y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是()。

A.10 5

B.20 5

C.20 40

D.10 40

点击查看答案
第5题
设有如下通用过程:Public Function f(x As Integer)Dim y As Integerx=20y=2f=x*yEnd Function在

设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Static x As Integer x=10 y=5 y=f(x) Print x;y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是()。

A.10 5

B.20 5

C.20 40

D.10 40

点击查看答案
第6题
设有如下通用过程:Public Sub Fun(a()As Integer,x As Integer)For i=1 To 5x=x+a(i)NextEnd Sub

设有如下通用过程: Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next End Sub 在窗体上画一个名称为Text1的文本框和一个名称为Commandl的命令按钮。然后编写如下的事件过程: Private Sub Commandl_Click() Dim arr(5)As Integer,n As Integer For i=1 To 5 arr(i)=i+i Next Fun arr,n Text1.Text=Str(n) End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是______。

A. 30

B.25

C.20

D.15

点击查看答案
第7题
设有如下通用过程:Public Function Fun (xStr As String) As StringDim tStr As String,strL As

设有如下通用过程:Public Function Fun (xStr As String) As String Dim tStr As String,strL As Integer tStr=-" " strL=Len(xStr) i=strL/2 Do Whilei<=strL tStr=tStr &id(xStr,i+1,1) i=i+1 Loop Fun=tStr & tStrEnd Function 在窗体上画—个名称为Text1的文本框和—个名称为Command1的命令按钮,然后编写如下的事件过程:Private Sub Command1_ Click() Dim S1 String S1="ABCDEF" Text1.Text=LCase(Fun(S1))End Sub 程序运行后,单击命令按钮,文本框中显示的是 ______。

A.ABCDEF

B.abcdef

C.defdef

D.defabc

点击查看答案
第8题
设有下列通用过程:Public Function Fun(xStr As String)As StringDim tStr As String,strL As In

设有下列通用过程:

Public Function Fun(xStr As String)As String

Dim tStr As String,strL As Integer

tStr=""

strL=Len(xStr)

i=strL/2

DO While i<=StrL

tStr=tStr&Mid(xStr,i+1,1)

i=i+1

Loop

Fun=tStr&tStr

End Function

在窗体上画一个名称为Textl的文本框和一个名称为Command1的命令按钮。然后编写下列的事件过程:

Private Sub Commandl Click()

Dim S1 As String

S1="ABCDEF"

Text1.Text=LCase(Fun(S1))

End Sub

程序运行后,单击命令按钮,文本框中显示的是()。

A.ABCDEF

B.abedef

C.defdef

D.defabc

点击查看答案
第9题
设窗体上有一个名为Txtl的文本框和一个名为Commandl的命令按钮,并有以下事件过程:Private Sub Co

设窗体上有一个名为Txtl的文本框和一个名为Commandl的命令按钮,并有以下事件过程:

Private Sub Commandl一Click()

x!==Val(Textl.Text)

Select Case x

Casc Is<-10,Is>=20

Print“输入错误”

Case Is<0

Print 20 x

Case ls<10

Print 20

Case Is=20

Print x+10

End Select

End Sub

程序运行时,如果存文本框中输入一5,则单击命令按钮后的输出结果是

A.5

B.20

C.25

D.输入错误

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改