命令按钮Command1的MouseUp事件过程结构如下: Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, _ X As Single, Y As Single) …… End Sub 则以下叙述中错误的是_______________。A.X、Y参数表示的是Command1左上角在窗体中的位置B.Button参数用于确定按下的鼠标键C.Shift参数用于确定是否按下了Alt、Ctrl或Shift键D.MouseUp表示抬起鼠标按键时触发的事件

命令按钮Command1的MouseUp事件过程结构如下: Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, _ X As Single, Y As Single) …… End Sub 则以下叙述中错误的是_______________。

A.X、Y参数表示的是Command1左上角在窗体中的位置

B.Button参数用于确定按下的鼠标键

C.Shift参数用于确定是否按下了Alt、Ctrl或Shift键

D.MouseUp表示抬起鼠标按键时触发的事件


参考答案和解析
X 、Y参数表示的是Command1左上角在窗体中的位置

相关考题:

执行下列程序后,鼠标单击窗体,输出结果为 。Private Sub Form_Click()Print "Click";End SubPrivate Sub Form_MouseDown(Button As Integer, Shift _As Integer, X As Single, Y As Single)Print "Donw"End SubPrivate Sub Form_MouseUp(Button As Integer, Shift _As Integer, X As Single, Y As Single)Print " Up"End Sub( )。A.DownUpClickB.ClickDownUpC.DownClickUpD.UpDownClick

在以下事件过程中,可以在用户按下鼠标右键时,显示一个上边框,以鼠标当前位置为中心的弹出式菜单,而且这个弹出式菜单还可以识别右键对菜单命令的选择,相应的选项是( )。A.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _X As Single, Y As Single)If Button=2 ThenPopupMenu mnuEdit, vbPopupMenuCenterAlign Or _vbPopupMenuRightButton, X, Y, mnuEditOpenEnd IfEnd SubB.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _X As Single, Y As Single)If Button=2 ThenPopupMenu mnuEdit,End IfEnd SubC.Private Sub Form_MouseUp(Button As Integer, Shift As Integer, _X As Single, Y As Single)PopupMenu mnuEdit, vbPopupMenuCenterAlign Or _vbPopupMenuRightButtonEnd SubD.Private Sub Form_MouseUp(Button As Integer , _Shift As Integer, X As Single, Y As Single)If Button=2 ThenPopupMenu mnuEdit, 2End IfEnd Sub

在窗体上画1个命令按钮,名称为Command1,然后编写如下程序: Dim Flag As Boolean Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox(“请输入:”) If Flag Then Print f(intNum) End If End Sub Function f(X as Integer)As Integer If X<10 Then Y=X Else Y=X+10 End If f=Y End Function Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X as Single,Y As Single) Flag=True End Sub 运行程序,首先单击窗体,然后单击命令按钮,在输入对话框中输入5,则程序的输出结果为______。A.0B.5C.15D.无任何输出

对窗体编写如下事件过程: 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

在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序: Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func=Y End FunctiOn Phvate Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) SW=False End Sub Phvate Sub Form_MouseUp(BuRon As Integer,Shin As Integer,X As Single,Y As Single) SW=Tree End Sub Pdvate Sub Commandl-Click() Dim intNum As Integer intNum=InputBox("") If SW Then Print func(intNum) End If End Sub 程序运行后,单击命令按钮,将显示一个输入对话框,如果在输入对话框中输入25,则程序的执行结果为______。A. 输出0B.输出25C.输出45D.无任何输出

在窗体上画一个名称为Command1的命令按钮,然后编写如下程序:Dim SW As BooleanFunction func(X As Integer) As IntegerIf X 20 ThenY = XElseY = 20 + XEnd Iffunc = YEnd FunctionPrivate Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)SW = FalseEnd SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)SW = TrueEnd SubPrivate Sub Command1_Click()Dim intNum As IntegerintNum = InputBox("")If SW Then Print func(intNum)End IfEnd Sub程序运行后,单击命令按钮,将显示一个输入对话框,如果在输入对话框中输入25,则程序的执行结果为( )。A.输出0B.输出25C.输出45D.无任何输出

假定已经在菜单编辑器中建立了窗体的弹出式菜单,其顶级菜单项的名称为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 SubB.Private Sub Form_MouseDown(Button As Integer,_ Shift As Integer,X As Single,Y As Single) PopupMenu a1 End SubC.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 SubD.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

( 25 )要求当鼠标在图片框 P1 中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是A )Private Sub P1_MouseMove ( Button AS Integer,Shift As Integer,X As Single,Y As Single )Print X,YEnd SubB )Private Sub P1_MouseDown ( Button AS Integer,Shift As Integer,X As Single,Y As Single )Picture.Print X,YEnd SubC )Private Sub P1_MouseMove ( Button AS Integer,Shift As Integer,X As Single,Y As Single )P1.Print X,YE n d S u bD )Private Sub Form_MouseMove ( Button AS Integer,Shift As Integer,X As Single,Y As Single )P1.Print X,YEnd Sub

要求当鼠标在图片框P1中移动时,立即在图片框中显示鼠标的位置坐标。下面能正确实现上述功能的事件过程是A.Private Sub P1_MouseMove(Button As Integer,Shift As Integer,x As Single,Y As Single) Print X,Y End SubB.Private Sub P1_M0useDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Picture.Print X,Y End SubC.Private Sub P1_MouscMove(Button As integer,Shift As Integer,X As Single,Y As Single) P1.Print X.Y End SubD.Private Sub Form_MouseMove(Button As Integer,Shift As Integer,x As Single,Y As Single) P1.Print X.Y End Sub

在以下事件过程中,可以在用户按下鼠标右键时,显示一个上边框,以鼠标当前位置为心的弹出式菜单,而且这个弹出式菜单还可以识别右键对菜单命令的选择,相应的选项;A.Private Sub Form. _ Mouse Up(Button As Integer,Shift AS Integer,_ X As Single,Y As Single) If Button=2 Then PopupMenu mnuEdit,vbPopupMenuCenterAlign Or_ vbPopupMenuRightButton,X,Y,mnuEditOpen End If End SubB.Private Sub Form. _ MouseUp(Button AS Integer,Shift AS Integer,_ X As Single,Y As Single) If Button=2 Then PopupMenu mnuEdit, End If End SubC.Private Sub Form. _ MouseUp(Button AS Integer,Shift AS Integer,_ X As Single,Y As Single) PopupMenu mnuEdit,vbPopupMenuCenterAlign Or_ vbPopupMenuRightButton End SubD.Private SUb Form. _ MouseUp(Button AS Integer,_ Shift As Integer,X As Single,Y As Single) If Button=2 Then PopupMenu mnuEdit,2 End If End Sub

下面程序是由鼠标事件在窗体上画图,如果按下鼠标可以画图,双击窗体则可以清除所画图形。补充完整下面的程序。首先在窗体层定义如下变量:Dim PaintStart As Boolean编写如下事件过程:Private Sub Form_Load()DrawWidth=2ForeColor=vbGreenEnd SubPrivate Sub Form_MouseDown(Button As Integer,Shift As Integer,X AS Single,Y AS Single)PaintStart=TrueEnd SubPrivate Sub Form_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)If PaintStart ThenPSet(X,Y)End IfEnd SubPrivate Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single)End SubPrivate Sub Form_DblClick()ClsEnd Sub

设已经在菜单编辑器中设计了窗体的快捷菜单,其顶级菜单为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 SubB.Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) PopupMenu Bt End SuhC.Private Sub Form. MouseDown(Button As Integer, Shift As Integer, _ X As Single, Y As Single) PopupMenu Bt,0 End SubD.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

阅读下列程序: Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func=Y End Function Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=False End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single, Y As Single) SW=True End Sub Private Sub Command1_Click() Dim intNum As Integer intNum=InputBox(" ") If SW Then Print func(intNum) End If End Sub 程序运行后,单击一次窗体,再单击命令按钮,将显示一个输入对话框,如果在对话框中输入20,则程序的输出结果为A.0B.20C.40D.无任何输出

设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为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 SubB.Private Sub Form_MouseDown(ButtonAsInteger,ShiftAsInteger,X As Single,Y As Single) PopupMenu a1,0 End SubC.Private Sub Form_Mouse Down(Button As Integer,Shift As Integer,X As Single,Y As Single) PopupMenu a1 End SubD.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

执行下列程序后,鼠标单击窗体,输出结果为Private Sub Form_Click()Print "Click";End SubPrivate Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)Print "Donw"End SubPrivate Sub Form_MouseUp(ButtonAs Integer,Shift As Integer,X As Single,Y As Single)Print "Up"End SubA.DownUpClickB.ClickDownUpC.DownClickUpD.UpDownCliek

设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为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 SubB.Private Sub Form. Mouse Down(Button As Integer,Shift As Integer,_X As Single,Y As Single) PopupMenu a1,0 End SubC.Private Sub Form_Mouse Down(Button As Imeger,Shift As Integer,_X As Single,Y As Single) PopupMenu a1 End SubD.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

在窗体上画一个名称为Commana1的命令按钮,然后编写如下程序: Dim SW As Boolean Function func(X As Integer)As Integer If X<20 Then Y=X Else Y=20+X End If func = Y End Function Private Sub Form. MouseDown(Button As Integer,_ Shift As Integer,X As Single, Y As Single) SW = False End Sub Private Sub Form_MouseUp( Button As Integer,_ Shift As Integer ,X As Single, Y As Single) SW = True End Sub Private Sub Commandl_Click( ) Dim intNum As Integer intNum = InputBox(" ") If SW Then Print func(intNum) End If End Sub 程序运行后,单击命令按钮,将显示一个输入对话框,如果在对话框中输入25,则程序的执行结果为A.输出0B.输出25C.输出45D.无任何输出

编写如下代码:Dim Flag As BooleanPrivate Sub Form. MouseDown (Button As Integer,Shift As Integer, X As Single, Y As Single)Flag = TrueEnd SubPrivate Sub Form. MouseMove (Button As Integer,Shift As Integer, X As Single, Y As Single)Flag = FalseEnd SubPrivate Sub Form_ MouseUp (Button As Integer,Shift As Integer, X As Single, Y As Single)If Flag = False ThenPrint "DDDD"End IfEnd Sub程序运行后,如果想在窗体上输出DDDD,则应执行的操作为______。

对窗体编写如下事件过程: 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

对窗体编写如下事件过程: 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 BBBBBB.BBBBBC.AAAAAD.BBBBB AAAAA

假定已经在菜单编辑器中建立了窗体的弹出式菜单,其顶级菜单的名称为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 SubB.Private Sub Form_ MouseDown (Button As Integer, _ Shift As Integer, X As Single, Y As SinglE)PopupMenu a1 End SubC.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 SubD.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

假定已经在菜单编辑器中建立了窗体的弹出式菜单,其顶级菜单的名称为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 SubB.Private Stlb Form_MouseDown(Button As Integer,_Shift As Integer,X As Single, Y As Single) PopupMenu a1 End SubC.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 SubD.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

设已经在菜单编辑器中设计了窗体的快捷菜单,某顶级菜单为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 SubB.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single, Y As Single PopupMenu al,0 End SubC.Private Sub Form_Mouse Down(Button As Integer, Shift As Integer,_X As Single,Y As Single PopupMenu al End SubD.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

执行下列程序后,鼠标单击窗体,输出结果为Private Sub Form_Click()Print "Click";End SubPrivate Sub Form_mouseDown(Button As Integer,ShiftAs Integer, X As Single, Y As Single)Print "Donw"End SubPrivate Sub Form_MouseUp(ButtonAsInteger,ShiftAs Integer, X As Single, Y As Single)Print "Up"End SubA.DownUpClickB.ClickDownUpC.DownClickUpD.UpDownClick

执行下列程序后,鼠标单击窗体,输出结果为 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 SubA.DownUpClickB.CfickDownUpC.DownClickUpD.UpDownClick

单选题窗体的MouseUp事件过程如下:Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single,Y As Single)……End Sub关于以上定义,以下叙述中错误的是(   )。A根据Shift参数,能够确定使用转换键的情况B根据X、Y参数可以确定触发此事件时鼠标的位置CButton参数的值是在MouseUp事件发生时,系统自动产生的DMouseUp是鼠标向上移动时触发的事件

单选题对窗体编写如下事件过程: 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 程序运行后,如果单击鼠标右键,则输出结果为()AAAAAABBBBBBCAAAAA CR BBBBB(其中CR表示回车和换行)DBBBBB CR AAAAA

单选题对窗体编写如下事件过程: Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single Y As Single) If Button=2 ThenPrint"AAAAA"End IfEnd SubPrivate Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single) Print"BBBBB" End Sub程序运行后,如果单击鼠标右键,则输出结果为()AAAAAABBBBBBCAAAAA CR BBBBB(其中CR表示回车和换行)DBBBBB CR AAAAA