设在工程中有一个标准模块,其中定义了如下记录类型: Type Books Name As String *10 TelNum As String *20 End Type 在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是
A. Private Sub Command1_Click() Dim B As Books Open "c:\Person.txt" For Output As #1BName=InputBox(“输入姓名”)BTelNum=InputBox(“输入电话号码”) Write #1,BName,BTelNum Close #1 End Sub
B. Private Sub Command1_Click() Dim B As Books Open "c:\Person.txt" For Input As #1B@Name=InputBox(“输入姓名”)BTelNum=InputBox(“输入电话号码”) Print #1,BName,BTelNum Close #1 End Sub
C. Private Sub Command1_Click() Dim B As Books ppen "c:\Person.txt" For Output AS #1BName=InputBox(“输入姓名”)BTelNum=InputBox(“输入电话号码”) Write #1,B Close#1 End Sub
D. Privte Sub Command1_Click() Open "c:\Person.txt" For Input As #1 Name=InputBox(“输入姓名”) TelNum=InputBox(“输入电话号码”) Print#1,Name,TelNum Close #1 End Sub
查看答案
在窗体(名称为Form1)上绘制一个名称为Text1的文本框和一个名称为Commandl的命令按钮,然后编写一个事件过程。程序运行后,如果在文本框中输入一个字符,则把命令按钮的标题设置为“计算机等级考试”。以下能实现上述操作的事件过程是
A. Private Sub Tex1_Change() Command1.Caption=“计算机等级考试” EndSub
B. Private Sub Command1_Click() Caption="计算机等级考试”
C. Private Sub Command1_Click() Text.Caption=“计算机等级考试” End Sub
D. Private Sub Command1_Click() Textl.Text=-"计算机等级考试” End Sub
在窗体上绘制一个名称为List1的列表框,一个名称为Labe11的标签,列表框中显示若干个项目。当单击列表框中的某个项目时,在标签中显示被选中项目的名称。下列能正确实现上述操作的程序是
A. PriVate Sub List1_Click() Labell.CaptiOn=List.ListIndex End Sub
B. PriVate Sub List1_Click() Labell.Name=listl.ListIndex End Sub
C. Private Sub List1_Click() Labell.Name=Listl.Text End Sub
D. Private Sub List1_Click() Labell.Caption=List1.Text End Sub
规范职务序列,就是指从警察职业的性质、特点和工作任务出发,将公安队伍的组成人员分为()类进行管理。
A. 2
B. 3
C. 4
D. 5
在极度危险时刻,如果人民群众的利益与个人利益发生冲突时,人民警察应当首先考虑保护自己。因为只有保护好自己,才能更好地服务人民。()
A. 正确
B. 错误