Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd behavior using ctDropMenu
Message
From
05/09/2008 09:43:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Odd behavior using ctDropMenu
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345135
Message ID:
01345135
Views:
63
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
Reply
Map
View

Click here to load this message in the networking platform