New Mouse events for Modeless Forms

Started by jb, April 28, 2008, 08:14:43 AM

Previous topic - Next topic

jb

5.0.0.13
I'm trying to use the two new events, OnMouseEntered & OnMouseMovedOff, to automatically roll up a modeless form.  I'm using the two subs below just to see when the events are firing: this throws AutoCAD in to a loop printing the two princs at the command line over and over.  Must use Task Manager to shut down AutoCAD.  What's the appropriate use of these two events???


(defun c:jb001_00_OnMouseEntered ( /)
     (princ "\nOnMouseEntered")
)
(defun c:jb001_00_OnMouseMovedOff ( /)
     (princ "\nOnMouseMovedOff")
)


Thanks for any help . . .

jb
James Buzbee
Managing Memeber
Black Horse Development, LLC

owenwengerd

The problem is that OnMouseEnter is being called continuously instead of only when the mouse first enters the dialog.  I'll get that corrected for the next Alpha.  In the meantime, you could set a flag when the mouse moves off, then ignore the OnMouseEnter event if the flag is not set.
Owen Wengerd (Outside The Box) / ManuSoft

jb

James Buzbee
Managing Memeber
Black Horse Development, LLC

Kelie

Owen,

The OnMouseEntered and OnMouseMovedOff event is working nicely. Thanks! But they behave in a slightly different manner. The OnMouseEntered event is fired whenever mouse is hovered over the form, no click is needed, but the OnMouseMovedOff event is only fired when user clicks on the screen. Is this the intended behavior?

Thank you!

owenwengerd

Yes, that is by design when the keyboard focus is on a control that accepts keyboard input. In that case, the mouse is "captured" by the control with focus and not released until it is clicked outside the form.

Quote from: Kelie on May 09, 2008, 10:54:51 AM
The OnMouseEntered event is fired whenever mouse is hovered over the form, no click is needed, but the OnMouseMovedOff event is only fired when user clicks on the screen. Is this the intended behavior?
Owen Wengerd (Outside The Box) / ManuSoft