单项选择题

窗体上有名称为Command1的命令按钮和名称为Text1的文本框( )。 Private Sub Command1_Click() Text1.Text="程序设计":Text1.SetFocus End Sub Private Sub Text1 GotFocus0 Text1.Text="等级考试" End Sub 运行以上程序,单击命令按钮后( )。

A.文本框中显示的是“程序设计”,且焦点在文本框中
B.文本框中显示的是“等级考试”,且焦点在文本框中
C.文本框中显示的是“程序设计”,且焦点在命令按钮上
D.文本框中显示的是“等级考试”,且焦点在命令按钮上
题目列表

你可能感兴趣的试题

单项选择题

设在工程中有一个标准模块,并定义了如下类型: Type Stutype ino As Integer stmame As String*20 strsex As String*2 smark As Single End Type 在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1_Click时,在C盘根目录下的随机文件Student.dat中写入一条记录。下列能够完成该操作的是( )。

A.Sub Command1_Click() Dim student As Studtype Dim record_no As Integer record_no=1 With student .ino=12:.stmame="smith": .strsex==男=:.smark=89 End With Open"c:\Student.dat"For Input As#1 Len =Len(Student) Put#1,record_no,Student Close#1 End Sub
B.Sub Command1_Click() Dim Student As Stutype Dim Record_no As Integer Record_no=1 With Student .ino=12:.strname="smith" .strsex="男":.smark=89 End With Open"c:\student.dat"For RandomAs As#1 Len=Len(Student) put#1,Record_no,Student Close#1 End Sub
C.Private Sub Command1_Click() DimStudent As Stutype Dim Record no As Integer Record_no=1 With Student .ino=12:.stmame="smith" .strsex="男":.smark=89 End With Open"c:\student.dat"For Random As 1 Len=Len(Student) Write#1,Record_no,Student Close#1 End Sub
D.Sub Command1_Click() Dim Student As Stutype Dim Record_no As Integer Record_no=1 With Student .ino=12:.stmame="smith" .strsex="男":.smark=89 End With Open"c:\student.dat"For Output As#1 Len=Len(Student) Put#1,Record_no,Student Close#1 End Sub
微信扫码免费搜题