更多"下列过程的功能是:在对多个文本框进行输入时,对第一个文本框(text1"的相关试题:
[填空题]
下列过程的功能是:在对多个文本框进行输入时,对第一个文本框(text1)输入完毕后用回车键使焦点跳到第二个文本框(text2),而不是用TAB键来切换。请填空。
Private Sub [11] KeyDown(KeyCode As Integer,Shift As
Integer)
If KeyCode [12] vbKeyRetum
Then
Text2.SetFocus
End If
End
Sub
[填空题]下列过程的功能是:在对多个文本框进行输入时,对第1个文本框(text1)输入完毕后用回车键使焦点跳到第2个文本框(text2),而不是用Tab键来切换。请完成该程序。
Private Sub Text1_KeyDown(Keycode As Integer , Shift As Integer)
If______Then
Text2.______
End If
End Sub
[单项选择]窗体上有两个名称分别为Text1、Text2的文本框。Text1的KeyUp事件过程如下:
Private Sub Text1_KeyUp(KeyCode As Integer,Shift As Integer)
Dim c As String
c=UCase(Chr(KeyCode))
Text2.Text=Chr(Asc(c)+2)
End Sub
当向文本框Text1中输入小写字母a时,文本框Text2中显示的是( )。
A. A
B. a
C. C
D. c
[单项选择]在窗体上画一个名称为Text1的文本框,然后编写如下事件过程: Private Sub Text1_ KeyPress (KeyAscii As Integer) Dim ch As String ch = Chr (KeyAscii) KeyAscii = Asc (UCase(ch)) Text1. Text = String(1, KeyAscii) End Sub程序运行后,使文本框拥有焦点,然后按键盘上的B键,则在文本框中显示的内容是 ______ 。
A. b
B. bb
C. BB
D. B
[单项选择]在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是
[单项选择]在运行阶段,要在文本框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
[单项选择]在运行阶段,要在文本框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
[单项选择]窗体上有名称分别为Text1、Text2的2个文本框,要求文本框Text1中输入的数据小于
500,文本框Text2中输入的数据小于1000,否则重新输入。为了实现上述功能,在以 下程序中问号(?)处应填入的内容是______。
Private Sub Text1_LostFocus( ) Call CheckInput(Text1,500) End Sub
Private Sub Text2_LostFocus( ) Call CheckInput(Text2,1000) End Sub
Sub CheckInput(t As ,x As Integer) If Val(t.Text)>x Then
MsgBox "请重新输入!"
End If
End Sub
A. Text
B. SelText
C. Control
D. Form