网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

练习2.程序启动时,在窗体上输出“欢迎进入Visual Basic!”。(标签练习) 提示:程序启动时,在窗体上输出,所以事件为窗体的Load事件,输出用Print方法。Load事件中使用Print方法。 代码如下: Private Sub Form_Load() Form1.Print "欢迎进入Visual Basic!" End Sub 本题答案请上传程序运行结果截图


参考答案和解析
事竟成
更多 “练习2.程序启动时,在窗体上输出“欢迎进入Visual Basic!”。(标签练习) 提示:程序启动时,在窗体上输出,所以事件为窗体的Load事件,输出用Print方法。Load事件中使用Print方法。 代码如下: Private Sub Form_Load() Form1.Print "欢迎进入Visual Basic!" End Sub 本题答案请上传程序运行结果截图” 相关考题
考题 为了使用窗体输出,使Print方法在Form_Load事件中起作用,必须设置窗体的属性。A. AutoReDraw B. BackColor C. Moveable D. Caption

考题 在窗体上画一个名称为 \Command1\ 的命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a As StringA="123456789"For i=1 To 5Print Space(6-i);Mid $ (a,______ ,2*i-1)Next iEnd Sub程序运行后,单击命令按钮,窗体上的输出结果是5456345672345678123456789请填空。

考题 把窗体的KeyPreView属性设置为True,并编写如下两个事件过程:Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)Print KeyCodeEnd SubPrivate Sub Form_KeyPress(KeyAscii As Integer)Print KeyAsciiEnd Sub程序运行后,如果按下B键,则在窗体上输出的数值是 【12】 和 【13】 。

考题 窗体上有两个按钮,则执行程序后按键盘Cance1键的输出结果是 【7】 。Private Sub Command1_Click()Print "北京";End SubPrivate Sub Command2_Click()Print "南京";End SubPrivate Sub Form_Load()Command2.Cancel=TrueCommand1.Cancel=TrueEnd Sub

考题 对窗体编写如下事件过程: Private Sub Form_ MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button =2 Then Print “AAAAA” End If End Sub Private Sub Form_ MouseUp (Button As Integer,Shift As Integer,X As Single,Y As Single) Print “BBBBB” End Sub 程序运行后,如果单击鼠标右键,则输出结果为______ 。A.AAAAA BBBBBB.BBBBBC.AAAAAD.BBBBB AAAAA

考题 设窗体上有一个名为Text1的文本框,并编写如下程序:Private Sub Form_Load() Show Text1.Text="" Text1.SetFocusEnd SubPrivate Sub Form_MouseUp(Button As Integer,_Shift As Integer,X As Single,Y As Single) Print"程序设计"End SubPrinvate Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) Print "Visual Basic";End Sub 程序运行后,如果在文本框中输入字母“a”,然后单击窗体,则在窗体上显示的内容是。A.Visual BasicB.程序设计C.Visual Basic 程序设计D.a程序设计

考题 把窗体的KeyPreview属性设置为True,并编写如下两个事件过程:Private Sub Form_KeyDown(KcyCode As Integer,Shift As Integer)Print Key Code;End SubPrivate Sub Form_KeyPress(KeyAscii As Integer)Print Key AsciiEnd Sub程序运行后,如果按下A键,则在窗体上输出的数值为【 】和【 】。

考题 在窗体上画一个文本框(Textl),然后编写如下事件过程: Private Sub Text1_KeyPress(KeyAscii As Integer) Dim char As String char=Chr(KeyAscii) KeyAscii=Asc(Ucase(char)) Print String(4,KeyAscii) End Sub 程序运行后,在文本框Text1中输入A,则程序在窗体上的输出结果为A.aB.AC.aaaaD.AAAA

考题 在窗体上添加文本框Text1,然后编写下列程序: Private Sub Form_Load() Text1.Text=" " End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) Char=Chr(KeyAscii+1) KeyAscii=Asc(Ucase(Char)) End Sub Private Sub Command1_Click() Print Text1.Text End Sub 程序运行后,在文本框中依次输入1、2、3、a、b、c,单击命令按钮,则窗体上显示的内容是A.23BCDB.ABCC.!@#ABCD.123abc

考题 有下列程序: Option Base 0 Private Sub Command1_Click() Dim City As Variant x = Array("Visual","Basic","Microsoft","Programming") Print x(2) End Sub 程序运行后,单击命令按钮,则在窗体上显示的内容是A.MicrosonB.错误提示C.VisualD.Basic

考题 编写如下事件过程: Private Sub Form_Click() k=2 Ifk>=1 Then A=3 Ifk>=2 Then A=2 Ifk>=3 Then A=1 Print A End Sub 程序运行后,单击窗体,输出的结果为 ______。A.1B.2C.3D.出错

考题 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl—Click() x=InputBox(“请输入一个整数”) Print x+345 End Sub 程序运行后,单击命令按钮,在输入对话框中输入123,则在窗体上输出的内容为( )A.123345B.468C.123D.345

考题 在窗体上画—个名称为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, Shift As Integer) Print "VisualBasic"; End Sub 程序运行后,如果按A键,然后单击窗体,则在窗体上显示的内容是 ______。A.Visual BasicB.程序设计C.A程序设计D.Visual Basic程序设计

考题 设窗体上有一个名为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,Shift As Integer) Print "Visual Basic"; End Sub 程序运行后,如果在文本框中输入字母“a”,然后单击窗体,则在窗本上显示的内容是A.Visual BasicB.程序设计C.Visual Basic程序设计D.a程序设计

考题 在窗体上画一个名称为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,Shift As Integer) Print"Visual Basic"; End Sub 程序运行后,如果按A键,然后单击窗体,则在窗体上显示的内容_________。A.Visual BasicB.程序设计C.A程序设计D.Visual Basic程序设计

考题 在窗体上画一个列表框、一个文本框及一个按钮,然后编写如下两个事件过程: Private Sub Form_Load() For i=1 To 10 List1.AddItem i * 10 Next i Text1.Text=" " End Sub Private Sub List1_Click() Print List1.Text + Text1.Text End Sub 程序运行后,在文本框中输入“123”,然后双击列表框中的第四行,则在窗体上输出的结果为A.40123B.163C.123D.30123

考题 为了使用窗体输出,使Print方法在Form_Load事件中起作用,必须设置窗体的( )属性。A.AutoReDrawB.BackColorC.MoveableD.Caption

考题 窗体上命令按钮Command1的事件过程如下:End Sub 该程序执行后,输出结果是( )。

考题 设窗体上有一个名为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,Shift As Integer) Print"Visual Basic"; End Sub 程序运行后,如果在文本框中输入字母“a”,然后单击窗体,则在窗体上显示的内容是______。A. Visual BasicB.程序设计C.Visual Basic程序设计D.a程序设计

考题 在窗体上画一个名称为Text1的文本框,并编写如下程序: Private Sub Form_Load( ) Show TextText = " " TextSetFocus End Sub Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y _ As Single) Print "程序设计" End Sub Private Sub Text1_Ke!tDown(KeyCode As Integer,Shift As Integer) Print "Visual Basic"; End Sub 程序运行后,如果按A键,然后单击窗体,则在窗体上显示的内容是 ______。A.Visual BasicB.程序设计C.A程序设计D.Visual Basic程序设计

考题 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Call sub1(-15.1,2.54) End Sub Public Function sub1(a As Integer,ByVa1 b As String) As Integer a=Val(B)sub1=a Print sub1 End Function 程序运行后,单击命令按钮,在窗体上输出的是A.3B.2C.-15D.提示出错

考题 对窗体编写如下事件过程: Private Sub Form_ Mouse Down(Button As Integer,Shift As Integer,X AS Single,Y As Single) If Button=2 Then Print "AAAAA" End if End Sub Private Sub Form. _ MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single) Print "BBBBB" End Sub 程序运行后,如果单击鼠标右键,则输出结果为 ______。A.AAAAA BBBBBB.BBBBB AAAAAC.AAAAAD.BBBBB

考题 在窗体上画一个名称为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, Shift As Integer) Print"VisualBasic"; End Sub 程序运行后,如果按A键,然后单击窗体,则在窗体上显示的内容是______。A.Visual BasicB.程序设计C.A程序设计D.Visual Basic程序设计

考题 在窗体上画一个名称为Text1的文本框,并编写如下程序: Private Sub Form_Load() Show Textl.Text="" Textl.Set Focus End Sub Private Sub Form_MouseUp(Button As Inateger,Shift As Integer,X As Single,Y As Single) Frint"程序设计" End Sub Private Sub Textl_KeyDown(KeyCode As InteSer,Shin As Integer) Print"VisualBasic"; End Sub 程序运行后,如果按A键,然后单击窗体,则在窗体上显示的内容是______。A.Visual BaskB.程序设计C.A程序设计D.ViualBasic程序设计

考题 在窗体上画了两个按钮控件Command1和Command2,有如下程序: Private Sub Command1_Click() Print "Visual"; End Sub Private Sub Command2_Click() Print "Basic"; End Sub Private Sub Form_Load() CommandCancel=True Command1.Cancel=True End Sub 执行程序后,按键盘Cancel键,在窗体上输出的结果是A.BasicB.VisualC.CancelD.True

考题 在窗体上画一个名称为Text1的文本框,并编写如下程序: Private Sub Form Load( ) Show Text1.Text="" Text1.SetFocus End Sub Pfivate Sub Form_MouseUp(BuHon As Integer,Shift As Integer,X As Single,Y As Single) Print“程序设计” End Sub Private Sub Text1_KeyDown(KeyCode As Integer,shift As Integer) Print"Visua1 Basic"; End Sub 程序运行后,如果按“A”键,然后单击窗体,则在窗体上显示的内容是A.VisualBasicB.程序设计C.A程序设计D.Visual Basic程序设计

考题 设有如下程序; 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, Shift As Integer) Print "Visual Basic" End Sub程序运行后,如果在文本框中输入字母a(即直接按a键),然后单击窗体,则在窗体上显示的内容是______。A.Visual BasicB.程序设计C.Visual Basic程序设计D.A程序设计

考题 要在Form_Load事件过程中用Print方法在窗体上输出结果,应先调用窗体的()方法。A、MoveB、ClsC、ShowD、Circle