单选题使用Cls方法能够清除窗体或图片框中
单选题窗体上有2个名称分别为Text1和Text2的文本框,编写如下程序:Private Sub Form_Load() Private Sub Commandl_Click() Text1.Text="" Print Text1.Text+Text2.Text Text2.Text="" End SubEnd Sub程序运行后,在Text1和Text2中依次输入100和200,单击Commandl,则输出结果为
单选题在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click()
a$=InputBox("请输入一个二进制数")
n=Len(a$)
For i=1 To n
Dec=Dec*2+______(a$,i,1)
Next i
Print Dec
End Sub
程序的功能为:单击命令按钮,将产生一个输入对话框,此时如果在对话框中输入一个二进制数,并单击“确定”按钮,则把该二进制数转换为等值的十进制数。这个程序不完整,应在“______”处填入的内容是______。
单选题有两个关系R,S如下:由关系R通过运算得到关系S,则所使用的运算为______。A)选择B)插入C)投影D)联接
单选题如果把命令按钮的Cancel属性设置为True,则程序运行后
单选题列表框中的项目保存在一个数组中,这个数组的名字是
单选题为了通过传值方式来传送过程参数,在函数声明部分应使用的关键字为______。
A.Value
B.ByVal
C.ByRef
D.Reference
单选题具有3个结点的二叉树有
单选题下面函数的功能应该是:删除字符串str中所有与变量ch相同的字符,并返回删除后的结果。
例如,若str="ABCDABCD",ch="B",则函数的返回值为:"ACDACD"
Function delchar(str As String, ch As String)As String
Dim k As Integer, tempAs String, ret As Strinq
ret=""
For k=1 To Len(str)
temp=Mid(str,k,1)
If temp=ch Then
ret=ret&temp
End If
Next k
delchar=ret
End Function
但实际上函数有错误,需要修改。下面的修改方案中正确的是______。
单选题下列哪个是面向对象程序设计不同于其他语言的主要特点?
单选题下列排序方法中,最坏情况下比较次数最少的是( )。
单选题下列控件没有Change事件的是____。
单选题单击一次窗体之后,下列程序代码的执行结果为______ 。 Private Sub Command1_ Click() Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 4 Print Value(a, b, c) End Sub Function Num(x As Integer, y As Integer, z As Integer) Num = x * x + y * y + z * z End Function Function Value(x As Integer, y As Integer, z As Integer) Value = Num(x, y, z) + 2 * x End Function
单选题以下关于变量作用域的叙述中错误的是
单选题编写如下程序: Private Sub Command1_Click() Dim n As Integer:Static s As Integer For n=1 To 3 s=s+n Next Print s End Sub 程序运行后,第三次单击命令按钮Command1时,输出结果为
单选题有如下函数过程: Function Fun(ByVal x As Integer,ByVal y As Integer)As Integer Do While y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下调用函数的事件过程,该程序的运行结果是( )。 Private Sub Command7_Click() Dim a As Integer,b As Integer a=100:b=25 x=Fun(a,B) Print X End Sub A) 0 B) 25 C) 50 D) 100
单选题在窗体上画—个名称为Text1的文本框,并编写如下程序: Private Sub Form_Load() Show Text1.Text==" " Text1.SetFocus End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single) Print“程序设计” End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) Print "VisualBasic"; End Sub 程序运行后,如果按A键,然后单击窗体,则在窗体上显示的内容是 ______。
单选题工程文件中包含一个模块文件和一个窗体文件。模块文件的程序代码是:Public x As Integerprivate y As Integer窗体文件的程序代码是:
Dim a As Integer
Private Sub Form_Load()
Dim b As Integer
a=2:b=3::x=10:y=20
End Sub
Private Sub Command1_Click()
a=a+5:b=b+5:x=x+5:y=y+5
Print a; b; x; y
End Sub
运行程序,单击窗体上的命令按钮,则在窗体上显示的是
单选题下面函数的功能应该是:删除字符串str中所有与变量ch相同的字符,并返回删除后的结果。例如,若str=“ABCD-ABCD”,ch=“B”,则函数的返回值为“ACDACD”。
Function delchar(str As String,ch As String) As String
Dim k As Integer,tempAs String,ret As String
ret=""
For k=1 To Len(str)
temp=Mid(str,k,1)
If temp=ch Then
ret=ret & temp
End lf
Next k
delchar=ret
End Function
但实际上函数有错误,需要修改。下面的修改方案中正确的是______。
单选题执行如下程序段后,intsum的值为______。