对窗体编写如下事件过程: Private Sub Form_MouseDown(Button As Integer,Shif tAs 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、AAAAAB、BBBBBC、AAAAA CR BBBBB(其中CR表示回车和换行)D、BBBBB CR AAAAA
对窗体编写如下事件过程: Private Sub Form_MouseDown(Button As Integer,Shif tAs 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
- B、BBBBB
- C、AAAAA CR BBBBB(其中CR表示回车和换行)
- D、BBBBB CR AAAAA
相关考题:
在窗体上有一个命令按钮,其名称为Command1。要实现程序运行后,单击命令按钮,如果在输入对话框里分别输入12和4,编写如下事件过程:Private Sub Command1_Click()A=InputBox("被除数")B=InputBox("除数")Print A;"÷";B;"=";A / BEnd Sub则窗体中显示的内容是______。
布窗体上画一个名称为Command l的命令按钮,然后编写如下事件过程:Private Sub Command l-Click ()n=5f=ls=oFor I =l To nf=f【 】s= s +fNextPrint sEnd Sub该事件过程的功能是计算s=1+1/2!+l+3!+…+l/ n!的值。请填空。
把窗体的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】 。
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Sum=0 For x=1 To 5 Call subl(x, s) Sum=Sum+s Next x Print Sum End Sub Private Sub subl(y, w) w=1 For i=1 To y w=w*i Next i End Sub 程序运行后。单击命令按钮,则窗体上显示的内容是______。A.5B.120C.153D.160
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub subl(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) z=x*x+y*y End Sub Private Sub Command1_Click() Dim a As Integer a=8 Call subl(1, 2,a) Print a End Sub 程序运行后,单击命令按钮,则窗体下显示的内容是______。A.8B.2C.5D.11
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() a S="VisualBasic" Print String(3, a$) End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是______。A.VVVB.VisC.sicD.11
对窗体编写如下事件过程: 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
把窗体的KeyPreview属性设置为Tree,然后编写如下事件过程 Private Sub Form_KeyPress(KeyAscii As Integer) Dim ch As String ch=Chr(KeyAscii) KeyAscii=Asc(UCase(ch)) Print Chr(KeyAscii+2) End Sub 程序运行后,按键盘上的“A”键,则在窗体上显示的内容是______。A. AB.BC.CD.D
有如下SUB过程:Sub s(x As Single,y As Single)t=xx=t / yy=t Mod yEnd Sub在窗体上添加一个命令按钮,然后编写如下事件过程:Private Sub Form_Click()Dim a As SingleDim b As Singlea=5b=4s a,bPrint a,bEnd Sub则程序运行后,单击命令按钮,输出的结果为【 】 。
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim Y as StringX=5Y=X Space(3) XPrint X;Print Trim(Y);Len(Trim(Y))End Sub该程序的执行结果是【 】。
在窗体上添加一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Sum =0For i=3 T0 7Sum =i+2Next iMsgBox sum+iEnd Sub打开窗体后,单击命令按钮,消息框的输出结果是______。
如下图所示的两个窗体:要使其中第一个窗体中的第一个命令按钮来控制显示第二个窗体,第二个命令按钮用来结束程序的运行(两个按钮名称为Command1和Command2)。则以下选项中,对这两个命令按钮编写的事件过程正确的是A.Private Sub Command1 Click() Form2.Show 1 End Sub Private Sub Command2_Click()End End SubB.Private Sub Command1_Click() Show 1 End Sub Private Sub Conunand2_Click() End End SubC.Private Sub Conmmand1_Click() Show 1 End Sub Private Sub Command2_Click() End End SubD.Private Sub Command1_Click()Show 1, Form2 End SubPrivate Sub Command2_Click() End End Sub
窗体Form1上有一个名称为Command1的命令按钮,以下对应窗体单击事件的事件过程是( )。A.Private Sub Form1 Click( )End Sub···B.Private Sub Form1. Click( )End Sub···C.Private Sub Command1 click( )End Sub···D.Private Sub Command Click( )End Sub···
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Do Whileb>=0c=a+bLoopEnd Sub程序运行后,依次输入3,2,1,0,-1,-2,则输出结果是( )。
编写如下事件过程: 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.出错
在窗体上画一个命令按钮(名称为 Commandl),然后编写如下事件过程: Private Sub Commandl_Click() Static a As Integer a=a+1 End Sub 运行程序,第3次单击命令按钮后,变量a的值为( )A.0B.1C.2D.3
编写如下通用过程: Sub Proc(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Dim a As Single Dim b As Single a=5 b=4 Proc a,b Print a,b End Sub 程序运行后,如果单击命令按钮,则输出结果为A.5 4B.1.25 1C.4 5D.1.25 5
窗体Forml上有一个名称为Commandl的命令按钮,以下对应窗体单击事件的事件过程是A.Private Sub Forml_Click() … End SubB.Private Sub Form_Click() … End SubC.Private Sub Commandl_Click() … End SubD.Private Sub Command_Click() … End Sub
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() a$="VisualBasic" Print String(3,a$) End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是A.VVVB.VisC.sicD.11
假定有如下的Sub过程:Sub Sub1(x As Single,y As single)t=xx=t/yy=t Mod yEnd Sub在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_click()Dim a As SingleDim b As Singlea=5b=4Sub1 a,bPrint a;bEnd Sub程序运行后,单击命令按钮,输出结果为A.B.C.D.
在窗体上添加一个命令按钮(名为Command1),然后编写如下事件过程:Private Sub Command1_CliekDim b, kFor k = 1 to 6b=23+kNext kMsgBox b + kEnd Sub打开窗体后,单击命令按钮,消息框的输出结果是【 】。
为某个窗体编写如下事件,单击窗体,消息框显示的结果为【 】。Private Sub Form_Click( )Dim k As Integer ,n As Integer ,m As Integern=10:m=1:k=1Do While k<=nm=m*2k=k+1LoopMsgBox mEnd Sub
对窗体编写如下事件过程: 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
假定在窗体中的通用声明段已经定义有如下的子过程: Sub fix As Single,Y As Single)t=xx=yy=xEnd Sub在窗体上添加一个命令按钮(名为Commandl),然后编写如下事件过程: Private Sub Commandl_Click( ) a=10b=20f(a,B. MsgBox a&bEnd Sub打开窗体运行后,单击命令按钮,消息框输出的值分别为( )。A.20和10B.10和20C.10和10D.20和20
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub sub1(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) z=x * x+ y * y End Sub Private Sub Command1_Click() Dim a As Integer a = 8 Call sub1(1, 2,A)Print a End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.8B.2C.5D.11
有如下Sub过程: Sub Sun(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上的命令按钮Command1中,编写如下事件过程,执行该事件过程调用Sun过程,结果为( )。 Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a, b Print a; b End SubA.1.25 1B.5 4C.4 5D.1 1.25
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim x As Integer,y As Integer x = 41: y = 54 Call sub1(x,y) x = x + 1 Print x; y End Sub Private Sub sub1(n As Integer, ByVal m As Integer) n=n Mod 10 m=m\10 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.41 54B.2 54C.1 3D.42 3
窗体Form. 1上有一个名称为Command 1的命令按钮,以下对应窗体单击事件的事件过程是A)Private Sub Form. 1_Click() B)Private Sub Form. _Click()End Sub End SubC)Private Sub Commandl_Click() D)Private Sub Command_ Click()End Sub End Sub