Reputation:
I have a class from which I call a function ABC(string st)
with a string argument.
The function is defined inside a Form
class, Form1
.
I've a listview and want to invoke the listview mouse_click event automatically from the funcion - how can I do this?
Upvotes: 1
Views: 280
Reputation: 1503419
You can't invoke an event handler of another class - events encapsulate the idea of subscription and unsubscription for handlers, not invocation.
Which aspect of the ListView MouseClick event are you interested in? Would changing the selected item be enough, perhaps?
Upvotes: 3