有如下VB程序段: Private Sub Command1_Click() Dim a As Long a=Val(Text1.Text) Print a End Sub 其中"Private Sub Command1_Click()"的作用是()。A、定义一个数据处理方法B、定义一个数据输入方法C、定义一个事件过程D、定义一个数据类型

有如下VB程序段: Private Sub Command1_Click() Dim a As Long a=Val(Text1.Text) Print a End Sub 其中"Private Sub Command1_Click()"的作用是()。

  • A、定义一个数据处理方法
  • B、定义一个数据输入方法
  • C、定义一个事件过程
  • D、定义一个数据类型

相关考题:

在窗体上画一个文本框和一个图片框,然后编写如下两个事件过程:Private Sub Form_Click()Text1.Text = "VB程序设计"End SubPrivate Sub Text1_Change()Picture1.Print "VB Programming"End Sub程序运行后,单击窗体,则在文本框中显示的内容是______,而在图片框中显示的内容是_____。

有弹出式菜单的结构如下表,程序运行时,单击窗体则弹出如下图所示的菜单。下面的事件过程中能正确实现这一功能的是( )。A.Private Sub Form_Click() PopupMenu cut End SubB.Private Sub Command1_Click() PopupMenu edit End SubC.Private Sub Form_Click() PopupMenu edit End SubD.Private Sub Form_Click() PopupMenu cut End Sub

(10)在窗体上画一个文本框和一个图片框,然后编写下列两个事件过程: Private Sub Form_Click() Text1.Text="VB Programming" End Sub Private Sub Text1_Change() Picture1.Print"VB程序设计" End Sub 程序运行后,单击窗体,则在文本框中显示的内容是,而在图片框中显示的内容是 。

下列程序输出的结果为【 】。Private Sub Commandl_Click( )Dim a As Booleana = TrueIf a Then GoTo 11 Else GoTo 2211:Print "VB";22:Print "VC"End Sub

在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_ Click ( ) x = InputBox("Enter the First integer") y = InputBox("Enter the Second integer") Print y +xEnd Sub程序运行后,单击命令按钮,先后在两个输入对话框中分别输入456和123,则输出结果是 ______。A.579B.123C.456D.123456

设程序中有如下数组定义和过程调用语句: Dim a(10)As Integer … Call D(a) 如下过程定义巾,正确的是( )。A.Private Sub p(a As Integer)B.Private Sub p(a( )As Integer)C.Private Sub p(a(10)As Integer)D.Private Sub p(a(n)As Integer)

在窗体中添加一个命令按钮,并编写如下程序:Private Sub Command1_ Click() x=1: y=2: z=3 x=y: y=z: z=xEnd Sub程序执行后,输出的结果是______。A.3B.0C.2D.1

在窗体上画一个命令按钮,名称为Command1,然后编写如下程序:Private Sub Command1_ Click()Dim a As Integer, b As Integerdo while b <100 b=b+5 a=a+ b if b >20 then exit doLoopPrint a, bEnd Sub程序运行后,如果甲击命令按钮,则在窗体上显示的内容是______。A.50 20B.75 25C.50 25D.75 20

下列程序的执行结果为______。Private sub Command1_ Click ( ) a = 100 b = 50 if a <> b then a = a + b Else b = b -a Print a, bEnd SubA.50 50B.150 50C.200 200D.10 10

下列程序的功能是:当x100时, Private Sub Command1_ 下列程序的功能是:当x<50时,y =0.8 xx;当50≤x≤100时,y=0.7 xx;当x>100时,Private Sub Command1_Click()Dim x As Singlex = InputBox("请输入x的值" )Select Case xCase Is<50y=0.8 * xCase 50 To 100y=0.7 * x【 】Print "输入数据出界!"End SelectPrint x, yEnd Sub

如下有一段程序,窗体上打印出来的结果是______。Private Sub Command1_ Click() x=1 do x=x+3 Print x; Loop until x>=8End SubA.4 7 10B.1 3C.8D.1 8 9

如下图所示,只执行下列程序后,有Text1.Text=Text1,文本框不能出现“*****”的程序是______。A.Private Sub form_ Load() Text1. Text="*****"End SubB.Private Sub form_ Load() Text1. PasswordChar=“*”End SubC.Private Sub form_ Load() Text1. Visible="*****" End SubD.Private Sub form. Load() Text1. Text= String(5,"*")End Sub

下列程序的运行结果为______。Private Sub Command1_ Click() Dim s As Long Dim x As Integer s = 0 for x = 99 To 1 step - 2 s=s+ x Next x Print sEnd SubA.100B.500C.2500D.5000

在窗体上画—个名称为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程序设计

在窗体上画一个命令按钮(名称为Command1),然后编写如下事件过程:Private Sub Command1_ Click() Dim b As Integer b=b+1End Sub 运行程序,三次单击命令按钮后,变量b的值是______。A.0B.1C.2D.3

给出下面的程序:Private Sub Command1_ Click() Dim Check, Counter Check= True: Counter = 0 do do while Counter < 20 Counter = Counter +1 if Counter = 10 then Check=False exit do End if Loop Loop until Check=False MsgBox CounterEnd Sub 程序最后弹出的消息对话框的内容是______。A.TrueB.FalseC.20D.10

有过程如下:Sub fact (m As Integer, total As Long) Dim i As Integer total = 1 for i = 1 To m total = total*i Next iEnd Sub调用它的事件过程如下:Private Sub Command1_ Click () Dim tot As Long Dim a As Integer a = Val InputBox (“请输入数据”)) Call fact (a, tot) Print totEnd Sub则输入数据5,运行结果为 ______。A.100B.120C.200D.50

程序段如下:Private Sub Command1_ Click() a = 0 for 1=15 To 15 Step- 2 a = a +1 Next I Print a, IEnd Sub发生Command 1的单击事件后,程序的输出结果是 ______。A.0 13B.15 13C.0 15D.15 15

设程序中有如下数组定义和过程调用语句:Dim a(10) as integer……Call p(a)如下过程定义中,正确的是A)Private Sub p(a as integer)B)Private Sub p(a() as integer)C)Private Sub p(a(10) as integer)D)Private Sub p(a(n) as integer)

单击窗体时,下列程序代码的执行结果为______ 。 Private Sub Test (x As Integer) x=x*2+1 If x < 6 Then Call Test(x) End If x-x*2+1 Print x; End Sub Private Sub Command1_ Click () Test 2 End SubA.23 47B.5 11C.10 22D.23 29

在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_ Click() Dim arr (10) For i = 1 To 10 arr (i) = i ^ 2 Next i Print arr(i - 2) End Sub程序运行后,单击命令按钮,在窗体上输出的是______。A.49B.64C.81D.100

假定有如下的Sub过程:Sub Sub1 (x As Single, y As Single) t=x x = t/y y = t Mod yEnd Sub 在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_ Click() Dim a As Single Dim b As Single a = 5 b = 4 Sub1 a, b Print a; b End Sub 程序运行后,单击命令按钮,输出结果为______。A.5 4B.1 1C.1.2 5.4D.1.25 1

有弹出式菜单的结构如右表,程序运行时,单击窗体则弹出如下图所示的菜单。下面的事件过程中能正确实现这一功能的是( )。A.Private Sub Vorm Click( ) PopupMenu cut End SubB.Private Sub Command1 Click( ) PopupMenu edit End SubC.Private Sub Form. Click( ) PopupMenu edit End SubD.Private Sub Form. Click( ) PopupMenu cut PopupMenu paste End Sub

在窗体上画了两个按钮控件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

已知两个窗体Form1、Form2,下列事件过程中,______可以实现单击窗体Form1的命令按钮时,显示窗体Form2,而窗体Form1消失。A.Private Sub Command1_ Click() LoadForm2 Form1. Hide End SubB.Private Sub Command1_ Click() Show Form2 Form1. Hide EndSubC.Private Sub Command1_ click() Show Form2 Form1. Hide End SubD.Private Sub Command1_ click()

在窗体上画一个文本框和一个图片框,然后编写如下两个事件过程:Private Sub Form_Click()Textl.Text="VB程序设计"End SubPrivate Sub Textl_Change()Picturel.Print"VB programming"End Sub程序运行后,单击窗体,则在文本框中显示的内容是【 】,而在图片框中显示的内容是【 】。

单选题有如下VB程序段: Private Sub Command1_Click() Dim a As Long a=Val(Text1.Text) Print a End Sub 其中"Private Sub Command1_Click()"的作用是()。A定义一个数据处理方法B定义一个数据输入方法C定义一个事件过程D定义一个数据类型