单选题 VB
题号 #2536660

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

进入在线模考

参考答案

B

答案解析

SetFocus方法用于将焦点移到指定的对象上,而当一个对象获得焦点时将触发其GotFocus事件过程。

你可能感兴趣的试题

A.Private Sub Command1_Click()
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowFont
End Sub
B.Private Sub Command1Click()
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowOpen
End Sub
C.Private Sub Command1_Click()
CommonDialog1.DialogTitle ="ne w Caption"
CommonDialog1.ShowHelp
End Sub
D.Private Sub Command1_Click()
CommonDialog1.DialogTitle ="new Caption"
CommonDialog1.ShowColor
End Sub
找试题 · 找答案 · 找资料 在线模考