tap and hold event

  • Thread starter Thread starter Salazaar
  • Start date Start date
S

Salazaar

Hi,

I am trying to create a custom control using the .net framework sdk. I want
a context menu to popup when the control is clicked. Right now, the context
menu pops up only when the user taps and holds the stylus for a while. How
do I make this happend when the control is clicked instead of tapped and
held?

Any ideas?

Regards
 
* "Salazaar said:
I am trying to create a custom control using the .net framework sdk. I want
a context menu to popup when the control is clicked. Right now, the context
menu pops up only when the user taps and holds the stylus for a while. How
do I make this happend when the control is clicked instead of tapped and
held?

Stylus? Are you talking about a Tablet PC?
 
Override OnClick and use something like this:

contextMenu.Show( this, MousePosition );
 
Thanks, Floyd. Your solution works.

But, I still have a problem. The context is displayed on the click event,
but it is ALSO displayed on the tap-and-hold event. Is there is a way I can
block this event from occuring on the control and handle only the Click
event?

Perhaps I could override the MouseDown or some other combination of events
to let only the click event pass through.

Regards.
 
Back
Top