Context menu position

  • Thread starter Thread starter cskkleung
  • Start date Start date
C

cskkleung

Hi,

Does anyone know how to detect the context menu
coordinates in VB.NET. I have created a custom list
control and override the mouse down event, but
cannot detect where the user long click on the control!

Rgds,

Desmond Leung
 
Hi Desmond,

Unfortunately there isn't a straightforward way to detect the tap&hold on
netcf.
As a possible workaround, you could implement your own 'tap & hold' context
menu showing. Don't assign the contextmenu to Control.ContextMenu. Have
your control listen for a mouse down, and set your own timer to determine
if it's a tap&hold. If it is, show the context menu manually using
ContextMenu.Show(). The downside to this is you'll have to deal with your
own drawing of the ring-of-fire.

This has been added as a feature request.

Hope that helps,
-Katie

--------------------
| Content-Class: urn:content-classes:message
| From: "cskkleung" <[email protected]>
| Sender: "cskkleung" <[email protected]>
| Subject: Context menu position
| Date: Wed, 9 Jul 2003 02:09:14 -0700
| Lines: 10
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNF+cTCQeE+IpVESmKbS5D13ZDVSQ==
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!cpmsftngxa09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:27719
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Hi,
|
| Does anyone know how to detect the context menu
| coordinates in VB.NET. I have created a custom list
| control and override the mouse down event, but
| cannot detect where the user long click on the control!
|
| Rgds,
|
| Desmond Leung
|

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Mark,

Your thanks is noted :-). I shall add your request for mouse events on
textboxes to our customer-request list for our next release. It's pretty
difficult to trim down the desktop framework into something reasonably
small, and yet still make everyone happy. Sometimes we get it right,
sometimes we don't...but we'll keep working on getting it better. Let me
know if you have any other painpoints.

Thanks,
-Katie

--------------------
| From: (e-mail address removed) (Mark Erikson)
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Subject: Re: Context menu position
| Date: 7 Aug 2003 12:32:04 -0700
| Organization: http://groups.google.com/
| Lines: 32
| Message-ID: <[email protected]>
| References: <[email protected]>
<[email protected]>
| NNTP-Posting-Host: 216.196.148.219
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1060284725 21701 127.0.0.1 (7 Aug 2003
19:32:05 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: 7 Aug 2003 19:32:05 GMT
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!kibo.news.demon.net!demon!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-x
it-09!supernews.com!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:30423
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| (e-mail address removed) (Katie Schaeffer [MSFT]) wrote in message
| > Hi Desmond,
| >
| > Unfortunately there isn't a straightforward way to detect the tap&hold
on
| > netcf.
| > As a possible workaround, you could implement your own 'tap & hold'
context
| > menu showing. Don't assign the contextmenu to Control.ContextMenu.
Have
| > your control listen for a mouse down, and set your own timer to
determine
| > if it's a tap&hold. If it is, show the context menu manually using
| > ContextMenu.Show(). The downside to this is you'll have to deal with
your
| > own drawing of the ring-of-fire.
| >
| > This has been added as a feature request.
| >
| > Hope that helps,
| > -Katie
|
|
| I'd just like to tack on my request for tap & hold detection. In
| particular, it'd be nice if the OnMouseX functions were added to the
| CF TextBox class. Yes, I understand that space is at a premium and
| that the API designers had to chop out whatever they could, but that
| one would be _really_ nice to have. Heh... I keep going back and
| forth between frustration at obvious stuff being left out
| (Icon.FromHandle comes to mind, as does WndProc support) and giddiness
| at how easy other stuff is. Oh, well.
|
| On an unrelated note, I'd like to extend my thanks to all the folks
| from Microsoft who post here in the newsgroups. It's nice to know
| that you guys really do note and respond to user feedback.
|
| Mark Erikson
|

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top