Hi Daniel,
The best way I can think of to help you is to tell you a bit more about
what happens for Control.MousePosition. When this is called, we first try
a 'GetCursorPos' API call. If this succeeds (returns non-zero), we convert
that point to client coordinates and return it.
If that API fails (returns non-zero), we return an internally cached point
containing the last mouse position given by mousemoves. (I believe this
may have been the bug you were running into - we now update that cache
position for mousedown, move, and mouseup). Unfortunately this isn't fixed
for our service paks, so it may be a while before I can get it into your
hands.
There is, however, some hope...check out this article by one of our MVPs:
http://blog.opennetcf.org/afeinman/PermaLink.aspx/82242aee-5711-4c6d-b9e2-3d
3cd6610b5d
He shows an example intercepting the WM_HELP message - purhaps you can get
this to work for you with the WM_CONTEXTMENU or WM_LBUTTONDOWN messages.
Please let me know if you make any progress with this.
-Katie
This posting is provided "AS IS" with no warranties, and confers no rights.
***.Net Compact Framework Info***
Faq:
http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/default.a
spx
QuickStarts:
http://samples.gotdotnet.com/quickstart/CompactFramework/
Samples:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/h
tml/CompactfxTechArt.asp
--------------------
| From: <Daniel Barisch>
| References: <
[email protected]>
<eT#
[email protected]>
<
[email protected]>
<
[email protected]>
| Subject: Re: Textbox Click, KeyUp events
| Date: Wed, 7 Jan 2004 11:58:44 +0100
| Lines: 40
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: pd953ee76.dip.t-dialin.net 217.83.238.118
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
..phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:42344
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Hello Katie!
|
| Thank you for your reply!
|
| > There's not really an easy way to get this event for textboxes under
| > NetCF. The easiest thing to do would be to write a custom control
| > (basically inherits from 'Control', which does support Click events).
| > What's the scenario you're trying to accomplish - maybe I can suggest
| > another workaround or event for you to use?
|
| It wasn't really the TextBox-Click-Event I was interested in...
| I've another problem, that I've posted some weeks ago. But I haven't got
any
| answer, wether in this ng, nor in an other one. But because I'm still
| looking for a solution I'll repeat...
|
| ====
| In the Popup-eventhandler of a ContextMenu I need to get the position
where
| the stylus hits the control to call the ContextMenu.
|
| Asking the MousePosition-Property in ContextMenu.Popup returns the
expected
| values on the emulator, but there's a strange behavior on my device (iPAQ
| 3850 (ARM)):
| The Control.MousePosition contains the point, where you last clicked (just
| clicked, no ContextMenu) the 'clear' form (where is no control under the
| stylus and what perhaps has been some ContextMenus ago).
|
| Why does it work in the emulator, but not on my device?
|
| So how to get the point? You can't even save the position in MouseDown,
| because it is not fired, if the ContextMenu is called. Or is there a way
to
| force the control to fire MouseDown before the ContextMenu pops up?
| ====
|
| Do you have any suggestion? I thougth subclassing would be a (very hard
but)
| possible solution...
|
| Thanks, D.Barisch
|
|
|
|