单选题窗体的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是鼠标向上移动时触发的事件

单选题
窗体的MouseUp事件过程如下:Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single,Y As Single)……End Sub关于以上定义,以下叙述中错误的是(   )。
A

根据Shift参数,能够确定使用转换键的情况

B

根据X、Y参数可以确定触发此事件时鼠标的位置

C

Button参数的值是在MouseUp事件发生时,系统自动产生的

D

MouseUp是鼠标向上移动时触发的事件


参考解析

解析:
MouseUp事件是鼠标按键松开时触发的事件过程,事件过程的Button参数值由系统产生,为被按下的键,Shift参数表示Shift、Ctr1和Alt键的状态,X、Y参数表示光标的当前位置。鼠标移动时触发的事件是MouseMove。

相关考题:

执行下列程序后,鼠标单击窗体,输出结果为 。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

在窗体上画一个名称为Text1的文本框,并编写如下程序: Private Sub Form_Load() Show Text1.Text=" Text1.SetFocus End Sub Phvate Sub Form_MouseUp(Buuon As Integer,Shift As Integer,X As Single,Y As Single) Phnt“程序设计” End Sub Private Sub Textl_KeyDowA.Visual BasicB.程序设计C.A程序设计D.VisualBasic程序设计

在窗体上画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

设窗体上有一个名为Text1的文本框,并编写如下程序:Private Sub Form_Load() Show Text1.Text="" Text1.SetFocusEnd SubPrivate Sub Form_MouseUp(Button As Integer,_Shift As Integer,X As Single,Y As Single) Print"程序设计"End SubPrinvate Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) Print "Visual Basic";End Sub 程序运行后,如果在文本框中输入字母“a”,然后单击窗体,则在窗体上显示的内容是。A.Visual BasicB.程序设计C.Visual Basic 程序设计D.a程序设计

在以下事件过程中,可以在用户按下鼠标右键时,显示一个上边框,以鼠标当前位置为心的弹出式菜单,而且这个弹出式菜单还可以识别右键对菜单命令的选择,相应的选项;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

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

设窗体上有一个名为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 "Visual Basic"; End Sub 程序运行后,如果在文本框中输入字母“a”,然后单击窗体,则在窗本上显示的内容是A.Visual BasicB.程序设计C.Visual Basic程序设计D.a程序设计

在窗体上画一个名称为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"Visual Basic"; End Sub 程序运行后,如果按A键,然后单击窗体,则在窗体上显示的内容_________。A.Visual BasicB.程序设计C.A程序设计D.Visual Basic程序设计

阅读下列程序: 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

在窗体上画一个名称为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_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

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

在窗体上画一个名称为Text1的文本框,并编写如下程序: Private Sub Form_Load() Show Textl.Text="" Textl.Set Focus End Sub Private Sub Form_MouseUp(Button As Inateger,Shift As Integer,X As Single,Y As Single) Frint"程序设计" End Sub Private Sub Textl_KeyDown(KeyCode As InteSer,Shin As Integer) Print"VisualBasic"; End Sub 程序运行后,如果按A键,然后单击窗体,则在窗体上显示的内容是______。A.Visual BaskB.程序设计C.A程序设计D.ViualBasic程序设计

在窗体上画一个名称为Text1的文本框,并编写如下程序: Private Sub Form Load( ) Show Text1.Text="" Text1.SetFocus End Sub Pfivate Sub Form_MouseUp(BuHon 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"Visua1 Basic"; End Sub 程序运行后,如果按“A”键,然后单击窗体,则在窗体上显示的内容是A.VisualBasicB.程序设计C.A程序设计D.Visual Basic程序设计

执行下列程序后,鼠标单击窗体,输出结果为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_ 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 "Visual Basic" End Sub程序运行后,如果在文本框中输入字母a(即直接按a键),然后单击窗体,则在窗体上显示的内容是______。A.Visual BasicB.程序设计C.Visual Basic程序设计D.A程序设计

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

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