在运行阶段,要在文本框Textl获得焦点时选中文本框中所有内容,如图1所示,对应的事件过程是( )。
第1题:
要在文本框获得焦点时操作文本框中的内容,应该在( )事件过程中编写程序。
A.GotFocus
B.LostFocus
C.Change
D.SetFocus
第2题:
在运行阶段,要在文本框Textl获得焦点时选中文本框中所有内容,对应的事件过程是
A.Private Sub Text1_GotFocus() Text1.SelStart=0 Textl.Se1Length=Len(Text1.Text) End Sub
B.Private Sub Text1_LostFocus() Text1.SelStart=0 Textl.Se1Length=Len(Text1.Text) End Sub
C.Private Sub Text1_Change() Text1.SelStart=0 Textl.Se1Length=Len(Text1.Text) End Sub
D.Private Sub Text1_SetFocus() Text1.SelStart=0 Textl.Se1Length=Len(Text1.Text) End Sub
第3题:
在窗体上有一个名为Textl的文本框。当光标在文本框中时,如果按下字母“A”,则可被调用的事件过程是。 A.Form_KeyPress B.Textl_LostFocus C.Textl_Click D.Textl_Change
第4题:
要在文本框获得焦点时操作文本框中的内容,应该在( )事件过程中编写程序。
A.GoFocus
B.LostFocus
C.Change
D.SetFoeus
第5题:
在运行阶段,要在文本框Text1获得焦点时选中文本框中所有内容,对应的事件过程是
A.Private Sub Text1_GotFocus() Text1.SelStart=0 Text1.SelLength=Len(Text1.Text) End Sub
B.Private Sub Text1_LostFocus() Text1.SelStart=0 Text1.SelLength=Len(Text1.Text) End Sub
C.Private Sub Text1_Change() Text1.SelStart=0 Text1.SelLength=Len(Text1.Text) End Sub
D.Private Sub Text1_SetFocus() Text.SelStart=0 Text1.SelLength=Len(Text1.Text) End Sub
第6题:
在运行阶段,要在文本框Text1获得焦点时选中文本框中所有内容,对应的事件过程是( )
A.Private Sub Text1_GotFocus() Text1.SelStart=0 Text1.SelStart=Len(Text1.text) End Sub
B.Private Sub Text1_LostFocus() Text1.SelStart=0 Text1.SelStart=Len(Text1.text) End sub
C.Private Sub Text1_Change() Text1.SelStart=0 Text1.SelStart=Len(Text1.text) End sub
D.Private Sub Text1_SetFocus() Text1.SelStart=0 Text1.SelStart=Len(Text1.text) End sub
第7题:
设有如右图所示的窗体和下列程序:
Private Sub Command1_Click() Text1.Text="Visual Basic" End Sub Private Sub Text1_LostFocus() If Text1.Text<>"BASIC" Then Text1.Text=" " Text1.SetFocus End If End Sub程序运行时,在Text1文本框中输入“Basic”(如图所示),然后单击Command1按钮,则产生的结果是( )。
A.文本框中无内容,焦点在文本框中
B.文本框中为"Basic",焦点在文本框中
C.文本框中为"Basic",焦点在按钮上
D.文本框中为"Visual Basic",焦点在按钮上
第8题:
此题为判断题(对,错)。
第9题:
要在文本框获得焦点时操作文本框中的内容,应该在事件过程中编写程序。A. GotFocus B. LostFocus C. Change D. SetFocus