单选题 VB
题号 #2271027

在窗体上画两个标签和一个命令按钮,其名称分别为Label1、Label2和Command1,然后编写下列程序:
Private Sub rune(L AS Labe1)
Caption="1234"
End Sub 

Private Sub Form Load( )
Labe11.Caption="ABCDE"
Labe12.Caption=10
End Sub

Private Sub Command1Click( )
a=Va1(Label2.Caption)
Call func(Label1)
Label2.Caption a
End Sub
程序运行后,单击命令按钮,则在两个标签中显示的内容分别为( )。

进入在线模考

参考答案

D

答案解析

D。【解析】在Visual Basic中不仅可以使用变量作为形式参数,还可以使用窗体或控件作为通用过程的参数。
本题源程序在命令按钮的单击事件过程中,通过调用过程func将标签Label1的标题修改为“1234”;而标签Label2的标题保持不变,还是10。

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考