窗体上有Text1、Text2两个文本框及一个命令按钮Command1,编写下列程序Dim y As IntegerPrivate Sub Command1_Click()Dim x As Integerx=2Text1.Text=Fun2(Funl(x),y)Text2.Text=Funl(x)End SubPrivate Function Funl(x As Integer) As Integerx=x+y ∶y=x+yFunl=x+yEnd FunctionPrivate Function Fun2(x As Integer,y As Integer) As IntegerFun2=2*x+yEnd Function当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别是A.2 4 2 4B.2 4 4 8C.10 10 58 58D.4 4 8 8

窗体上有Text1、Text2两个文本框及一个命令按钮Command1,编写下列程序

Dim y As Integer

Private Sub Command1_Click()

Dim x As Integer

x=2

Text1.Text=Fun2(Funl(x),y)

Text2.Text=Funl(x)

End Sub

Private Function Funl(x As Integer) As Integer

x=x+y ∶y=x+y

Funl=x+y

End Function

Private Function Fun2(x As Integer,y As Integer) As Integer

Fun2=2*x+y

End Function

当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别是

A.2 4 2 4

B.2 4 4 8

C.10 10 58 58

D.4 4 8 8


相关考题:

在窗体中有两个文本框分别为 text1 和 text2 ,一个命令按钮 command1, 编写如下两个事件过程:Private sub command1_click()A=text1.value+text2.valueMsgbox aEnd subPrivate sub form_load()Text1.value= ””Text2.value= ””End sub程序运行时,在文本框 text1 中 78 ,在文本框 text2 中输入 87 ,单击命令按钮,消息框中输出的结果为____ 11 ___

在窗体上画两个文本框和一个命令按钮,然后在命令按钮的代码窗口中编写如下事件过程:Private Sub Command1_Click()Text 1="VB programming"Text 2=Text 1Text 1="ABCD"End Sub程序运行后,单击命令按钮,文本框Text 2中显示的内容为【 】。

窗体上有Text1、Text2两个文本框及一个命令按钮Command1,编写下列程序:Dim y As IntegerPrivate Sub Command1_Click()Dim x As Integerx=2Text1.Text=Fun2(Fun1(x),y)Text2.Text=Fun1(x)End SubPrivate Function Fun1(x As Integer) As Integerx=x+y:y=x+yFun1=x+yEnd FunctionPrivate Function Fun2(x As Integer,y As Integer) As IntegerFun2=2*x+yEnd Function当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别是A.2 4 2 4B.2 4 4 8C.10 10 58 58D. 4 4 8 8

窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序:DimY As IntegerPrivate Sub Command1 Click( )Dim X As Integerx=2Text1.Text=p2(p1(X),Y)Text2.Text=p1(x)End SubPrivate Function p1(X As Integer)As Integerx+x+v: y=x+yp1=x+yEnd FunctionPrivate Function p2(X As Integer,Y As Integer)As Integerp2=2*x+yEnd Function当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。A.2 42 4B.2 44 8C.4 48 8D.10 1058 58

窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序:Dim y As IntegerPrivate Sub Command1_Click()Dim x As Integerx=2Text1.Text=p2(p1(x),y)Text2.Text=p1(x)End SubPrivate Function p1(x As Integer)As Integerx=x+y:y=x+yp1=x+yEnd FunctionPrivate Function p2(x As Integer,y As Integer)As Integerp2=2*x+yEnd Function当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。A.2 4 2 4B.2 4 4 8C.4 4 8 8D.10 10 58 58

窗体上有两个文本框Text1、Text2以及一个命令按钮Command1,编写下列程序: Dim y As IntegerPrivate Sub Command1_Click()Dim x As Integer x=2 Text1.Text=p2(p1(x), y) Text2.Text=pi(x)End SubPrivate Function p1(x As Integer) As Integer x=x+y:y=x+y p1=x+yEnd FunctionPrivate Function p2(x As Integer, y As Integer) As Integer p2=2*x+yEnd Function 当单击1次和单击2次命令按钮后,文本框Text1和Text2内的值分别为( )。A.2 4 2 4B.2 4 4 8C.4 4 8 8D.10 10 58 58

窗体上有Text1、Text2两个文本框及一个命令按钮Command1,编写下列程序 Dim y As Integer Private Sub Command1_Click() Dim x As Integer X=2 Text1.Text=Fun2(Fun1(x),y) Text2.Text=Fun1(x) End Sub Private Function Fun1(x As Integer)As Integer x=x+y:y=x+y Fun1=x+y End Function Private Function Fun2(x As Integer,y As Integer)As Integer Fun2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Textl和Text2内的值分别是A.2 4 2 4B.2 4 4 8C.10 10 58 58D.4 4 8 8

在窗体中绘制两个文本框和一个命令按钮,然后在命令按钮的代码窗口中编写如下事件过程:Private Sub Command1_Click()Text1="VB programming"Text2=Text1Text1="ABCD"End Sub程序运行后,单击命令按钮,文本框Text2中显示的内容为【 】。

在窗体(Name属性为Form1)上画两个文本框(其Name属性分别为Text1和Text2)和一个命令按钮(Name属性为Command1),然后编写如下两个事件过程: 程序运行后,在第一个文本框(Text1)和第二个文本框(Text2)中分别输入“同学们,”和“你们好”,然后单击命令按钮,则输出结果为多少?