【正确答案】正确答案:(1)根据题意,将两个文本框控件和命令按钮添加到窗体中,两个文本框的名称为Textl和Text2,Text2的PasswordChar属性为“*”,命令按钮的名称为Commandl,Caption属性为“登录”。双击Commandl进入代码编辑窗口,编写如下代码: Private Sub Commandl_Click() If Textl.
Text
="ABC"And Text2.
Text
="ABC"Then'判断是否都为ABC
MsgBox
("正确") '是则弹出“正确”对话框 Else
MsgBox
("错误") '否则弹出“错误”对话框 End If End Sub 单击

按钮运行程序,并按要求保存。 (2)根据题意,将3个复选按钮控件、一个标签和一个命令按钮添加到窗体中,标签的Caption属性为“编程语言”,命令按钮的名称为Commandl,Caption属性为“显示”,3个复选按钮控件的名称分别为Checkl、Check2和Check3,Caption属性分别为“C++”、“Basic”和“JAVA”。双击命令按钮进入代码编写窗口,编写如下代码: Private Sub Commandl_Click() Dim str As String str="我会的编程语言是" If Checkl.
Value
=1 Then'Checkl被选中 str=str+Checkl.
Caption
End If If Check2.
Value
=1 Then'Check2被选中 str=str+Check2.
Caption
End If If Check3.
Value
=1 Then'Check3被选中 str=str+Check3.
Caption
End If Print str End Sub 单击
