编写如下事件过程: Private Sub Form_MouseDown(Button AS Integer,Shift AS Integer,_ X As Single,Y As Single) If Shift=6 And Button=2 Then Print,"PC" End If End Sub 程序运行后,为了在窗体上输出“PC”,应执行的操作为
A.同时按下Shift键和鼠标左键
B.同时按下Ctrl,Alt键和鼠标右键
C.同时按下Shift键和鼠标右键
D.同时按下Ctrl,Alt键和鼠标左键
第1题:
对窗体编写如下事件过程: 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 BBBBB
B.BBBBB
C.AAAAA
D.BBBBB AAAAA
第2题:
( 25 )要求当鼠标在图片框 P1 中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是
A )
Private Sub P1_MouseMove ( Button AS Integer,Shift As Integer,X As Single,
Y As Single )
Print X,Y
End Sub
B )
Private Sub P1_MouseDown ( Button AS Integer,Shift As Integer,X As Single,
Y As Single )
Picture.Print X,Y
End Sub
C )
Private Sub P1_MouseMove ( Button AS Integer,Shift As Integer,X As Single,
Y As Single )
P1.Print X,Y
E n d S u b
D )
Private Sub Form_MouseMove ( Button AS Integer,Shift As Integer,X As Single,
Y As Single )
P1.Print X,Y
End Sub
第3题:
A、左
B、右
C、同时按下左、右
D、按什么键都不显示
第4题:
设已经在菜单编辑器中设计了窗体的快捷菜单,其顶级菜单为Bt,取消其“可见”属性,运行时,在以下事件过程中,可以使快捷菜单相应鼠标右键菜单的是
A.Private Sub Form_MouseDown(Button As Integer, Shift As Integer,_ X As Single, Y As Single) If Button=2 Then PopupMenu Bt, 2 End Sub
B.Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) PopupMenu Bt End Suh
C.Private Sub Form. MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) PopupMenu Bt,0 End Sub
D.Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) If (Button=vbLeftButton) Or ( Button=vbRightButton) Then PopupMenu Bt End Sub
第5题:
编写了如下事件过程: Private Sub Form_MouseDown(KeyCode As Integer,Shift As Integer) If (Button And 3)=3 Then Print"AAAA" End If End Sub 程序运行后,为了在窗体上输出“AAAA”,应按下的鼠标键是
A.左
B.右
C.同时按下左和右
D.按什么键都不显示
第6题:
执行下列程序后,鼠标单击窗体,输出结果为
Private Sub Form_Click()
Print "Click";
End Sub
Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
Print "Donw"
End Sub
Private Sub Form_MouseUp(ButtonAs Integer,Shift As Integer,X As Single,Y As Single)
Print "Up"
End Sub
A.DownUpClick
B.ClickDownUp
C.DownClickUp
D.UpDownCliek
第7题:
编写如下代码:
Dim Flag As Boolean
Private Sub Form. MouseDown (Button As Integer,
Shift As Integer, X As Single, Y As Single)
Flag = True
End Sub
Private Sub Form. MouseMove (Button As Integer,
Shift As Integer, X As Single, Y As Single)
Flag = False
End Sub
Private Sub Form_ MouseUp (Button As Integer,
Shift As Integer, X As Single, Y As Single)
If Flag = False Then
Print "DDDD"
End If
End Sub
程序运行后,如果想在窗体上输出DDDD,则应执行的操作为______。
第8题:
对窗体编写如下事件过程: 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 BBBBB
B.BBBBB AAAAA
C.AAAAA
D.BBBBB
第9题:
假定已经在菜单编辑器中建立了窗体的弹出式菜单,其顶级菜单的名称为a1,其“可见”属性为False,则程序运行后,可以同时响应鼠标左键单击和右键单击的事件过程是 ______。
A.Private Sub Form_ MouseDown (Button As Integer, _ Shift As Integer, X As Single, Y As SinglE)If Button = 1 And Button = 2 Then PopupMenu al End If End Sub
B.Private Sub Form_ MouseDown (Button As Integer, _ Shift As Integer, X As Single, Y As SinglE)PopupMenu a1 End Sub
C.Private Sub Form_ MouseDown (Button As Integer, _ Shift As Integer, X As Single, Y As SinglE)If Button = 1 Then PopupMenu a 1 End If End Sub
D.Private Sub Form_ MouseDown(Button As Integer, _ Shift As Integer, X As Single, Y As SinglE)If Button = 2 Then PopupMenu a 1 End If End Sub
第10题:
假定编写了如下事件过程: Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Single) If Button=2 Then Print "aaaa" End If End Sub 程序运行后,为了在窗体上输出“AAAA”,应按下的鼠标键为
A.左键
B.右键
C.同时按下左、右键
D.按什么键都不显示
第11题:
执行下列程序后,鼠标单击窗体,输出结果为 Private Sub Form_Click() Print"Click": End Sub Private Sub Form_MouseDown(Button As Integer,Shift_As Integer,X As Single,Y As Single) Print"Donw" End Sub Private Sub Form_MouseUp(Button As Integer,Shift_As Integer,X As Single,Y As Single) Print"Up" End Sub
A.DownUpClick
B.CfickDownUp
C.DownClickUp
D.UpDownClick
第12题:
AAAAA
BBBBB
AAAAA CR BBBBB(其中CR表示回车和换行)
BBBBB CR AAAAA
第13题:
假定已经在菜单编辑器中建立了窗体的弹出式菜单,其顶级菜单项的名称为a1,其“可见”属性为False。程序运行后,单击鼠标左键或右键都能弹出菜单的事件过程是
A.Private Sub Form_MouseDown(Button As Integer,_ Shift As Integer,X As Single,Y As Single) If Button=1 And Button=2 Then PopupMenu a1 End If End Sub
B.Private Sub Form_MouseDown(Button As Integer,_ Shift As Integer,X As Single,Y As Single) PopupMenu a1 End Sub
C.Private Sub Form_MousoDown(Button As Integer,_ Shift As Integer,X As Single,Y As Single) If Button=1 Then PopupMenu a1 End If End Sub
D.Private Sub Form_MouseDown(Button As Integer,_ Shift As Integer,X As Single,Y As Single) If Buaon=2 Then PopupMenu a1 End If End Sub
第14题:
要求当鼠标在图片框P1中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是
A.Private Sub P1_MouseMove(Button As Integer,Shift As Integer,x As Single,Y As Single) Print X,Y End Sub
B.Private Sub P1_M0useDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Picture.Print X,Y End Sub
C.Private Sub P1_MouscMove(Button As integer,Shift As Integer,X As Single,Y As Single) P1.Print X.Y End Sub
D.Private Sub Form_MouseMove(Button As Integer,Shift As Integer,x As Single,Y As Single) P1.Print X.Y End Sub
第15题:
下面程序是由鼠标事件在窗体上画图,如果按下鼠标可以画图,双击窗体则可以清除所画图形。补充完整下面的程序。首先在窗体层定义如下变量:
Dim PaintStart As Boolean
编写如下事件过程:
Private Sub Form_Load()
DrawWidth=2
ForeColor=vbGreen
End Sub
Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X AS Single,Y AS Single)
PaintStart=True
End Sub
Private Sub Form_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
If PaintStart Then
PSet(X,Y)
End If
End Sub
Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single)
End Sub
Private Sub Form_DblClick()
Cls
End Sub
第16题:
设已经在“菜单编辑器”中设计了窗体的快捷菜单,其顶级菜单为Bs,取消其“可见”属性,运行时,在以下事件过程中,可以使快捷菜单响应鼠标右键菜单的是
A.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,_X As Single,Y As Single) If Button=2 Then PopupMenu Bs,2 End Sub
B.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,_X As Single,Y As Single) PopupMenu Bs End Sub
C.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,_X As Single,Y As Single) PopupMenu Bs,0 End Sub
D.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,_X As Single,Y AS Single) If(Button=vbLeftButton)Or(Button=vbRightButton)Then PopupMenu Bs End Sub
第17题:
设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为a1,且取消其“可见”属性。运行时,哪个事件过程可以使快捷菜单的菜单项响应鼠标左键单击和右健单击的事件过程是
A.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu a1,2 End Sub
B.Private Sub Form_MouseDown(ButtonAsInteger,ShiftAsInteger,X As Single,Y As Single) PopupMenu a1,0 End Sub
C.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,X As Single,Y As Single) PopupMenu a1 End Sub
D.Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If(Button=vbLetfButton) Or (Button=vbRightButton) Then PopupMenu a1 End Sub
第18题:
设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为a1,且取消其“可见”属性。运行时,以下( )事件过程可以使快捷菜单的菜单项响应鼠标左键单击和右键单击。
A.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,_X As Single,Y As Single) If Button=2 Then PopupMenu a1,2 End Sub
B.Private Sub Form. Mouse Down(Button As Integer,Shift As Integer,_X As Single,Y As Single) PopupMenu a1,0 End Sub
C.Private Sub Form_Mouse Down(Button As Imeger,Shift As Integer,_X As Single,Y As Single) PopupMenu a1 End Sub
D.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,_X As Single,Y As Single) If (Button=vbLetfButton)Or(Button=vbRightButton)Then PopupMenu a1 End Sub
第19题:
对窗体编写如下事件过程: 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 BBBBB
B.BBBBB
C.AAAAA
D.BBBBB AAAAA
第20题:
对窗体编写如下事件过程: Private Sub Form. _ MouseDown(BuRon 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 BBBBB
B.BBBBB
C.AAAAA
D.BBBBB AAAAA
第21题:
假定已经在菜单编辑器中建立了窗体的弹出式菜单,其顶级菜单的名称为al,其“可见”属性为False。程序运行后,单击鼠标左键或右键都能弹出菜单的事件过程是( )。
A.Private Sub Form_MouseDown(Button As Integer,_Shift As Integer,X As Single, Y As Single) If Button=1 And Blltton=2Then PopupMenu a1 End If End Sub
B.Private Stlb Form_MouseDown(Button As Integer,_Shift As Integer,X As Single, Y As Single) PopupMenu a1 End Sub
C.Private Sub Form—MouseDown(Button As Integer,_Shift As Integer,X As Single, Y As Single) If Button=1 Then PopupMenu a1 End If End Sub
D.Private Sub Form. MouseDown(Button As Integer,_Shift As Integer,X As Single, Y As Single) If Buttcn=2 Then PopupMenu a1 End If End Sub
第22题:
设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为al,且取消其"可见"属性。运行时,可以使快捷菜单的菜单项响应鼠标左键单击和右健单击的事件过程是
A.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single,Y As Single If Button=2 Then PopupMenu al,2 End Sub
B.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single, Y As Single PopupMenu al,0 End Sub
C.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single,Y As Single PopupMenu al End Sub
D.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single,Y As Single If(Button=vbLetfButton) Or (Button=vbRightButton) Then PopupMenu al End Sub
第23题:
编写如下事件过程; Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X AS Single, Y As Single) If Shif=6 And Button=2 Then Print"BBBB" End If End Sub 程序运行后,为了在窗体上输出“BBBB”,应执行的操作为______。
A.同时按下Shift键和鼠标左键
B.同时按下Shift键和鼠标右键
C.同时按下Ctrl、Alt键和鼠标左键
D.同时按下Ctrl、Alt键和鼠标右键
第24题:
AAAAA
BBBBB
AAAAA CR BBBBB(其中CR表示回车和换行)
BBBBB CR AAAAA