MouseMove event

A

Andy

As the control/screen tips don't work on a visio diagram if the layers
are locked, I have made use of the mousemove events. If the mouse is
not moved for a given period, i use a spatial search to find the shapes
and then display a modeless form. After a time or if the mouse is
moved, the form is hidden.

This works fine apart from 2 problems,

1. If another modeless form is displayed and i pass over a shape moving
onto the form, my tip form is displayed as the mouse hasn't moved for
my delay time. Obviously I don't get mouse move events on the form, but
there seems to be no way of determining if the visio diagram has lost
focus.

2. If another modal dialog is displayed, sometimes I get an error as my
timer fires and attempts to display my tip forrm. Either I need to
detect the Visio diagram has lost focus or that a modal dialog is
displayed.

Any suggestions welcomed.
 
J

JuneTheSecond

For me it is hard to get what you mean, but,,,
For your matter 1 : UserForm also have mouse events, did you use them?
For your matter 2 : Perhaps, perhaps, it might be an limit of VBA , if a
modal form is shown.
 
A

Andy

I'm having to implement my own screen/tool tip as the shapes are on
locked layers on my diagram, so the Visio shape tips do not appear.

The problem I get is that if the mouse moves off the visio diagram
onto any dialog box displayed, I cant detect the mouse is no longer on
the diagram.

I solved the modal one, I now catch the beforeModal event and cancel
the timer for my control tip popup. However, if I have a modeless
dialog box on the diagram, my control tip appears as the mouse stops
at the edge of the dialog. I was trying to avoid having to put code in
every one of my modeless dialogs to cancel my control tip timer.

Maybe I'm streching the bounds of what can be done with Visio & VBA,
really the diagram needs to have a mouse leave event. Or better still
for control tips to work even if the layers are locked.

Thanks, Andy
 
A

Andy

Hi Chris,

Thanks for that suggestion, I think that would work for the diagram
edges. However, in most cases its whereI have modeless dialogs on top
the visio diagram. So if i have a shape partly obscurred by the popup,
moving the mouse over that shape onto the dialog still give me my
control tip. Maybe I live with it, or failing that i try to catch mouse
events for all my dialogs. Was hoping to avoid that really.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top