Private Sub Form_Load()
Open"d:/temp/dat.txt"For Output As#1
Text1.Text=""
E.nd Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
lf(13)=13 Then
If UCase(Text1.Text)=______Then
C.lose 1
E.nd
E.lse
Write#1,______
Text1.Text=""
E.nd If
E.nd If
E.nd Sub
以上程序的功能是,在D盘temp目录下建立1个名为dat.txt的文件,在文本框中输入字符,每次按回车键(回车符的ASCII码是13)都把当前文本框中的内容写入文件dat.txt,并清除文本框中的内容;如果输入“END”,则结束程序。请填空。
[试题](12)在窗体上画一个文本框,名称为 Text1,然后编写如下程序:Private Sub Form_Load( )Open "d:/temp/dat.txt" For Output As #1Text1.Text=""E.nd SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)If KeyAscii=13 ThenIf UCase(Text1.Text)= (14) ThenC.lose #1E.ndE.lseWrite #1, (15)
[单选题]在窗体上画1个文本框,其名称为Text1,然后编写如下过程:Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer)Print Chr(KeyCode)E.nd SubPrivate Sub Text1_KeyUp(KeyCode As Integer,Shift As Integer)Print Chr(KeyCode+2)E.nd Sub程序运行后,把焦点移到文本框中,此时如果敲击“A”键,则输出结果为。A.AA.B.AB.
[单选题]在窗体上画1个文本框,名称为Text1,然后编写如下程序:程序的功能是,在c盘根目录下建立1个名为dat.txt的文件,在文本框中输入字符,每次按回车键(回车符的ASCII码是13)都把当前文本框中的内容写入文件dat.txt中,并清空文本框中的内容;如果输入“END”,则结束程序,请选择适合空白处的语句( )。A. KeyAscii ”END”B. Text1.Text ”END”C. Text1.Text 13D. KeyAscii 13
[单选题]在窗体上画—个名称为Text1的文本框,并编写如下程序: Private Sub Form_Load() Show Text1.Text==" " Text1.SetFocus End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single) Print“程序设计” End Sub Private Sub Text1_KeyDown(KeyCode As Integer,
[单选题]在窗体上画—个名称为Text1的文本框,并编写如下程序: Private Sub Form_Load() Show Text1.Text=" " Text1.SetFocus End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single) Print "程序设计" End Sub Private Sub Text1_KeyDown(KeyCode As Integer
[单选题]在窗体上画1个文本框,其名称为Text1,然后编写如下过程: Pfivme Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode) End Sub Private Sub Text1_KeyUp(KeyCode As Integer,Shift As Integer) Print Chr(KeyCode+2) End Sub 程序运行后,把焦点移到文本框中,此时如果敲击“A”键,则输出结果为______。
[单选题]在窗体上画1个文本框,其名称为Text1,然后编写如下过程:Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer)Print Chr(KeyCode)E.nd SubPrivate Sub Text1_Key Up(KeyCode As Integer,Shift As Integer)Print Chr(KeyCode+2)E.nd Sub程序运行后,把焦点移到文本框中,此时如果敲击“A”A.B.C.D.
[单选题]( 29 )在窗体上画 1 个文本框,其名称为 Text1 ,然后编写下列过程:Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer)Print Chr(KeyCode)E.nd SubPrivate Sub Text1_KeyUp(KeyCode As Integer,Shift As Integer)Print Chr(KeyCode+2)E.nd Sub程序运行后,把焦点移到文本框中,此时如果敲击 <A> 键
[试题]( 11 )在窗体上画 1 个文本框,名称为 Text1 ,然后编写下列事件过程:Private Sub Form_Load( )Open"d:/temp/dat.txt"For Output As#1Text1.Text= “ “E.nd SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)lf ( 13 ) =13 ThenIf UCase(Text1.Text)= ( 14 ) ThenC.lose 1E.ndE.lseWrite#1 ,
[单选题]在窗体上画一个文本框,其名称为Text1,然后编写如下事件过程:Private Sub Text1_KeyPress(KeyAscii As Integer)D.im str As StringStr=Chr(KeyAscii)KeyAscii=Asc(UCase (str))Textl.Text=String(2, KeyAscii)E.nd Sub程序运行后,如果在键盘上输入字母"b",则在文本框Text1中显示的内容是A.bbbB.BBBC.BBD.bb