Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Odd behavior using ctDropMenu
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Odd behavior using ctDropMenu
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01345135
Message ID:
01345135
Vues:
64
Gang,

We are using two ActiveX controls on a form. One is a graphics control that we wrote and the other is the ctDropMenu control from DBI. When the user right clicks on the graphics control, we display a context menu using ctDropMenu. So long as the user makes a selection from the menu all is well. But, if the user clicks off the menu anywhere on the form then the graphics controls mousemove event always returns the sum of the Right mouse button (2) and the value for whatever button was pressed when the user clicked off the DBI control. For example: If the user clicks right to bring the menu up and then clicks left somewhere other than in the menu the button parameter of any mouse function returns 3 for ever more! Even when NO mouse buttons are pressed.

We even added a function to the graphics control that would clear the mouse registers but that didn't help. I figured a partial workaround for this by creating a timer and in the right click of the graphics control setting the timers interval and then in the Timer event activating the context meny. This seems to avoid the problem about 98% of the time. A 2% rate is a BIG improvement over the 100% rate without the timer but I feel edgy about this wondering when it will raise it's head in some other more catastrophic way.

Has anyone had an experience like this or ideas?

Thanks

Steve
Répondre
Fil
Voir

Click here to load this message in the networking platform