M
Mark
Hi all, I am relatively new to .NET CF but quite experienced otherwise. I
have noticed an odd behaviour in the result I get from Control.MousePosition
depending on whether I am running my project on the Pocket PC emulator or on
a real PPC. I have "applied" the relevent CF 1 SP2 .Cab files to both
environments too.
Here is what I am trying to do, I have a DataGrid and a ContextMenu for it.
In the ContextMenu Popup event, I am looking at Control.MousePosition to try
and work out where in the DataGrid the ContextMenu was instigated so that I
can customise the menu to the data that the user put the pen down on. I do
some offset calcs to map from the Screen co-ordinates that
Control.MousePosition gives you, back to control relative co-ordinates that
I then pass to the DataGrid.HitTest method. The code all works fine on the
emulator and correctly calculates the row of the datagrid that the
ContextMenu orignated from etc. but on a real PPC the results are all over
the place. If I dump out the physical screen co-ords into an entry in the
ContextMenu, the real PPC is just inexplicably wierd in the results I see.
If anyone seen this problem and have any wisdom for me, I would greatly
appreciate it.
Thanks for taking the time to read this.
have noticed an odd behaviour in the result I get from Control.MousePosition
depending on whether I am running my project on the Pocket PC emulator or on
a real PPC. I have "applied" the relevent CF 1 SP2 .Cab files to both
environments too.
Here is what I am trying to do, I have a DataGrid and a ContextMenu for it.
In the ContextMenu Popup event, I am looking at Control.MousePosition to try
and work out where in the DataGrid the ContextMenu was instigated so that I
can customise the menu to the data that the user put the pen down on. I do
some offset calcs to map from the Screen co-ordinates that
Control.MousePosition gives you, back to control relative co-ordinates that
I then pass to the DataGrid.HitTest method. The code all works fine on the
emulator and correctly calculates the row of the datagrid that the
ContextMenu orignated from etc. but on a real PPC the results are all over
the place. If I dump out the physical screen co-ords into an entry in the
ContextMenu, the real PPC is just inexplicably wierd in the results I see.
If anyone seen this problem and have any wisdom for me, I would greatly
appreciate it.
Thanks for taking the time to read this.