Answered by:
catch listview mouse events in CF2

Question
-
Hi Folks,
I program using c#
I have a listview and want to catch the mouse events it generates when
an item is selected, tapped, double tapped etc.
Compact framework doesnt directly support these events. I basically want to have
a way to know that an event is generated and use the WndProc to handle it.
thanx,
NirajMonday, January 7, 2008 5:40 AM
Answers
-
If you don't want to do what Steve above said, for some reason, then you can subclass the control so that you can recieve the Window Messages. This link should give you a good head start on that if you're interested: http://blogs.msdn.com/netcfteam/archive/2005/05/20/420551.aspxMonday, January 7, 2008 3:38 PM
-
Also, you can look at the samples here:
http://blog.opennetcf.org/ayakhnin/PermaLink,guid,d652ddf7-8702-4253-a431-357703dc63c1.aspx
Monday, January 7, 2008 7:43 PM
All replies
-
In the listview there is an event called SelectedIndexChanged, why can you not use this event, it is obvious the someone scrolled or clicked on a new "item" when this event fires
Monday, January 7, 2008 2:28 PM -
If you don't want to do what Steve above said, for some reason, then you can subclass the control so that you can recieve the Window Messages. This link should give you a good head start on that if you're interested: http://blogs.msdn.com/netcfteam/archive/2005/05/20/420551.aspxMonday, January 7, 2008 3:38 PM
-
Also, you can look at the samples here:
http://blog.opennetcf.org/ayakhnin/PermaLink,guid,d652ddf7-8702-4253-a431-357703dc63c1.aspx
Monday, January 7, 2008 7:43 PM -
Thanx Folks,
The NativeWindow implementation works for me.
~nirajTuesday, January 8, 2008 6:08 AM -
I want to get the location (x, y) of which item was clicked as I want to position
a different control overlapping exactly that item. SelectedIndexChanged does not
give me this information.Wednesday, January 9, 2008 4:47 AM