假定有如下事件过程: Private Sub Form MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) If Button=2 Then

admin2009-02-13  43

问题 假定有如下事件过程:    Private Sub Form MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)       If Button=2 Then       PopupMenu popForm    End if    End Sub    则以下描述中错误的是______。

选项 A、该过程的功能是弹出一个菜单
B、popForm是在菜单编辑器中定义的弹出式菜单的名称
C、参数X、Y指明鼠标的当前位置
D、Button=2表示按下的是鼠标左键

答案8

解析 Visual Basic中没有提供专门的鼠标右击事件,但是在窗体的MouseDown事件里面,通过Button的值可以判断以后单击鼠标的键,当Button=1时,表示用户单击了鼠标左键。当Button=2时,表示用户单击了鼠标右键。因此应该选择D。Visual Basic中常常在MouseDown事件过程中调用PopupMenu方法弹出菜单。
转载请注明原文地址:https://kaotiyun.com/show/472p777K
0

最新回复(0)