W
William Bates
I am trying to add a mouseup/down event to a listview.
Using ApplicationEx I can capture the mouse event, and determine the X
and Y values of the mouse location. All good so far...
I now want to Invoke the mouse event for the listview. It is defined as:
public void ListView_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e) {}
I can do the invoke by:
Parent.Invoke ( new MouseEventHandler ( Parent.ListView_MouseUp ) );
where Parent is set when instantiating the class.
However this is not sufficient for my needs. I want to be able to add a
System.Windows.Forms.MouseEventArgs when I do the invoke.
I can store the mouse co-ordinates in some global variable and get it
from the parent form, but I was hoping that I could do it a cleaner way
using the ListView_MouseDown procedure above.
Should I marshal the MouseEventArgs?
Guidance is gratefully accepted.
Using ApplicationEx I can capture the mouse event, and determine the X
and Y values of the mouse location. All good so far...
I now want to Invoke the mouse event for the listview. It is defined as:
public void ListView_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e) {}
I can do the invoke by:
Parent.Invoke ( new MouseEventHandler ( Parent.ListView_MouseUp ) );
where Parent is set when instantiating the class.
However this is not sufficient for my needs. I want to be able to add a
System.Windows.Forms.MouseEventArgs when I do the invoke.
I can store the mouse co-ordinates in some global variable and get it
from the parent form, but I was hoping that I could do it a cleaner way
using the ListView_MouseDown procedure above.
Should I marshal the MouseEventArgs?
Guidance is gratefully accepted.