16.设已经在菜单编辑器中设计了窗体的快捷菜单,其顶级菜单为TIME,且取消其“可见”属性。为使运行时可以使快捷菜单的菜单项响应鼠标左键单击和右键单击,应设置如下事件过程: A、Private Sub Form_MouseDown(Button As Integer,Shift As Integer, _ X As Single,Y As Single) If Button=2 Then PopupMenu TIME,2 End Sub B、Private Sub Form_MouseDown(Button As Integer,Shift As Integer, _ X As Single,Y As Single) PopupMenu TIME,0 End Sub C、Private Sub Form_MouseDown(Button As Integer,Shift As Integer, _ X As Single,Y As Single) If (Button=vbLeftButton)Or(Button=vbRightButton)Then PopupMenu TIME End Sub D、Private Sub Form_MouseDown(Button As Integer,Shift As Integer, _ X As Single,Y AS Single) PopupMenu TIME End Sub
A B C D
17.窗体中代码如下:
Private Sub Form_Click( ) Dim x As Integer,y As Integer,z As Integer x=1:y=2:z=3 Call Procl(x,x,z) Call Procl(x,y,y) End Sub
Private Sub Procl(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=x+y Print x;y;z End Sub