MouseCallbackEventArgs and MouseCallback


I’m trying to get a mousecallback in the rhino viewport.

Why can’t I add a handler?

I’ve tried

AddHandler Rhino.UI.MouseCallback, AddressOf OnMouseDoubleClick

but get an error that MouseCallback is not an event of Rhino.UI.
How can I get this to work?

Protected Sub OnMouseDoubleClick(ByVal e As Rhino.UI.MouseCallbackEventArgs)
            If e.Button = Windows.Forms.MouseButtons.Left Then
            End If
End Sub

You should subclass the callback, then enable it on an instance of your subclass, I think.

What are you trying to do?

I’m trying to create a function where I can move controlpoints when I mouse down. It is not a function that I want to activate, I want to activate this whenever I hold my mousebutotn longer than … seconds.

Or when activated by a button or deactivated. But at least It should run on the background.

Function most likely be like. When an object is selected hold mousedown, control points will be activated and then you can “brush” over the control points and will be moved automaticly.