How to handle OnMouseDown event from custom Control when it has ContextMenu?

Q

Qualitea

Hi,

I'm writing a owner-drawn list custom control and found that, whenever
I set the ContextMenu properties of that control then my control will
not received mouse down event if user tap-and-hold (instead it will
show a circle and context menu).

The problem is I have to determine where is item of list (selected
item) which user was tap-and-hold and draw its state correctly.

In many other applications, list item always change its state to
selected everytime received a tap regardless of it is tap-and-hold or
not. Is it a NETCF bug?

P.S: My device was installed with NETCF SP3

Thanks,
Quan
 
A

Alex Feinman [MVP]

Instead of assigning ContextMenu, P/Invoke SHRecognizeGesture and trak the
menu yourself
 
Joined
Apr 4, 2006
Messages
1
Reaction score
0
Quan, I ran into the same problem today. I'm using ListBoxEx (OpenNETCF 1.4). I'll let you know if I find a solution (that is simpler than Alex's). Please post your solution if you find one.
-Chris
 

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