OCX控件制作问题,如何给OCX控件中添加Mousedown事件?

解决方案 »

  1.   

    在"通用"中先定义事件.Event MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)'然后在你想触发的地方写触发代码Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
       RaiseEvent MouseDown(Button, Shift, x, y)
    End Sub
      

  2.   

    感谢您的回复但是在制作的OCX后,引用此ocx在Mousedown事件中没有(Button As Integer, Shift As Integer, X As Single, Y As Single)