PC Review


Reply
Thread Tools Rate Thread

Control Dev. - OnMouseDown not called when ContextMenu set

 
 
=?Utf-8?B?U3RyaWRlcg==?=
Guest
Posts: n/a
 
      1st Mar 2007
Hello!

I am developing a grid control for the .NET CF2 and I have the following
problem:

I override the OnMouseDown function in order to activate the appropriate
cell when the user clicks on my control.

When I set a context menu to my control using Control.ContextMenu and the
user holds down the stylus, the OnMouseDown function is never called.
Instead, the context menu is displayed and the correct cell is never
activated.

Is there any other way to be notified when the stylus touches the screen
(regardless if it's being held down or not) besides the OnMouseDown event?

Thank you!
 
Reply With Quote
 
 
 
 
Steve
Guest
Posts: n/a
 
      2nd Mar 2007
Hi,

I had a similar problem and used the following link to sort it out. There's
a section about chilling out the context menu.

http://msdn.microsoft.com/msdnmag/is...tFramework/#S3

steve.

"Strider" <(E-Mail Removed)> wrote in message
news1FCC4F1-0631-4C37-83CB-(E-Mail Removed)...
> Hello!
>
> I am developing a grid control for the .NET CF2 and I have the following
> problem:
>
> I override the OnMouseDown function in order to activate the appropriate
> cell when the user clicks on my control.
>
> When I set a context menu to my control using Control.ContextMenu and the
> user holds down the stylus, the OnMouseDown function is never called.
> Instead, the context menu is displayed and the correct cell is never
> activated.
>
> Is there any other way to be notified when the stylus touches the screen
> (regardless if it's being held down or not) besides the OnMouseDown event?
>
> Thank you!



 
Reply With Quote
 
=?Utf-8?B?U3RyaWRlcg==?=
Guest
Posts: n/a
 
      4th Mar 2007
Thank you Steve, this is exactly what I needed. Although this article refers
to version 1.0 of the CF, it is strange to see that the same buggy context
menu behaviour still exists in CF 2.0. It makes you wonder how long it will
take for Microsoft to do something about it!

"Steve" wrote:

> Hi,
>
> I had a similar problem and used the following link to sort it out. There's
> a section about chilling out the context menu.
>
> http://msdn.microsoft.com/msdnmag/is...tFramework/#S3
>
> steve.
>
> "Strider" <(E-Mail Removed)> wrote in message
> news1FCC4F1-0631-4C37-83CB-(E-Mail Removed)...
> > Hello!
> >
> > I am developing a grid control for the .NET CF2 and I have the following
> > problem:
> >
> > I override the OnMouseDown function in order to activate the appropriate
> > cell when the user clicks on my control.
> >
> > When I set a context menu to my control using Control.ContextMenu and the
> > user holds down the stylus, the OnMouseDown function is never called.
> > Instead, the context menu is displayed and the correct cell is never
> > activated.
> >
> > Is there any other way to be notified when the stylus touches the screen
> > (regardless if it's being held down or not) besides the OnMouseDown event?
> >
> > Thank you!

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to handle OnMouseDown event from custom Control when it has ContextMenu? Qualitea Microsoft Dot NET Compact Framework 4 5th Apr 2006 05:21 PM
Custom control for a ContextMenu control =?Utf-8?B?Z2Vub2pvZQ==?= Microsoft VB .NET 1 21st Sep 2005 04:46 AM
Re: Attach ContextMenu to control Zieben Microsoft C# .NET 0 11th Mar 2005 08:04 AM
How to write a property like Control.ContextMenu tsteinke@gmail.com Microsoft Dot NET 0 22nd Feb 2005 11:01 PM
ContextMenu and OnMouseDown in custom control Andreas Selle Microsoft Dot NET Compact Framework 0 8th Jul 2004 10:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:32 AM.