I need a quick and simple (I hope) solution for my C# Windows Form application.
How can I make a Mouse Down
event that occurs every time I click anywhere in my form (not a specific object)?
I need a quick and simple (I hope) solution for my C# Windows Form application.
How can I make a Mouse Down
event that occurs every time I click anywhere in my form (not a specific object)?
so if you need to see exactly this would be an example of what you need to do
public Form1()
{
InitializeComponent();
this.MouseClick += mouseClick; // create the event/method for mouseClick then it will be called every time you click the mouse
}
I would recommend you read the documentation for the mouse click and mouse down events for proper handling of the mouse click life cycle plus the events of interest (mousedown) and go over the examples they provide. The problem as to why is not triggering the event you want, might be as simple as you not binding your mousedown event to your form/panel or area of interest.