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

  • Thread starter Thread starter Qualitea
  • Start date Start date
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
 
Instead of assigning ContextMenu, P/Invoke SHRecognizeGesture and trak the
menu yourself
 
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
 
Back
Top