题目内容

在窗体上画一个命令按钮command1和两个文本框,名称分别为Text1和Text2。编写如下两个事件过程:
Dim Str1 As String, str2 As String
Private Sub form_load()
Text1.Text=""
Text2.Text=""
Text1.Enabled=False
Text2.Enabled=False
End Sub
Private Sub Form.
str1=str1& Chr(KeyAscii)
End Sub
Private Sub Form.
str2=str2 & Chr(KeyCode)
End Sub
Private Sub Command1
Text1.Text=str1
Text2.Text=str2
str1=""
str2=""
End Sub
当在设计阶段的窗体的KeyPreview属性设置为True时,程序运行过程中,在键盘上输入小写字母abc,然后单击命令按钮,则文本框Text1中显示的内容为

A. abc
B. 不显示任何信息
C. ABC
D. 出错

查看答案
更多问题

编写如下两个事件过程。
Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer)
Print Chr(KeyCode)
End Sub
Private Sub Form_KeyPress(KeyAcii As Integer)
Print Chr(KeyAscii)
End Sub
在一般情况下(即不按住Shift键和锁定大写键时)运行程序,如果按"A"键,则程序输出的结果是

A A
B. a A
C. A
D. a a

以下用户自定义函数
Function Func(a As Integer, b As Integer) As Integer
Static m As Integer, i As Integer
m=0:i=2
i=i+m+i
m=i+a+b
Func=m
End Function
在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1
Dim k As Integer, m As Integer,p As Integer
k=4:m=1
P=Func(k,m)
Print p
End Sub
程序运行后,单击命令按钮,输出结果为

A. 8
B. 9
C. 10
D. 11

在窗体上添加一个按钮,名为Command1,然后编写如下的事件过程,输出结果为
Prinvate Sub Comand1_Click()
For i=1 To 4
x=4
For j=1 To 3
x=3
For k=1 To 2
x=x+5
Next
Next
Next
Print x
End Sub

A. 13
B. 26
C. 30
D. 40

Where can listeners get additional information?

At a project office.
B. At a website.
C. On 25th Street.
D. At the Town Hall.

答案查题题库