单选题
VB
2014-02-18
窗体上有名称为Command1的命令按钮和名称为Text1的文本框
Private Sub Command1_Click()
Text1.Text="程序设计"
Text1.SeFocus
End Sub
Private Sub Text1_GotFocus()
Text1.Text="等级考试"
End Sub
运行以下程序,单击命令按钮后( )
A.文本框中显示的是"程序设计",且焦点在文本框中
B.文本框中显示的是"等级考试",且焦点在文本框中
C.文本框中显示的是"程序设计",且焦点在命令按钮上
D.文本框中显示的是"等级考试",且焦点在命令按钮上
参考答案
B
答案解析
SetFocus方法用于将焦点移到指定的对象上,而当一个对象获得焦点时将触发其GotFocus事件过程。
你可能感兴趣的试题
A.Private Sub Command1_Click()
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowFont
End Sub
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowFont
End Sub
B.Private Sub Command1Click()
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowOpen
End Sub
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowOpen
End Sub
C.Private Sub Command1_Click()
CommonDialog1.DialogTitle ="ne w Caption"
CommonDialog1.ShowHelp
End Sub
CommonDialog1.DialogTitle ="ne w Caption"
CommonDialog1.ShowHelp
End Sub
D.Private Sub Command1_Click()
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowColor
End Sub
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowColor
End Sub
A.Input #l ,StuNo ,StuName ,StuEn
B.Put #l ,StuNo ,StuName ,StuEn
C.Write #1,StuNo ,StuName ,StuEn
D.Get #1,StuNo ,StuName ,StuEn
