So I’m working on my first big C# project and am currently trying to do the following. On the screen is a red stimulus, which after being clicked five times must emit an event. Let’s say in this case display a MessageBox. I know how to get MessageBoxes to display information on a button click, however, as mentioned, I want this one to show up after five clicks. I’ve scrounged the internet for weeks now and have not found anything suitable.
Here is the code I have where clicking on the stimulus yields the MessageBox with only one click.
private void AutoSPanel_Paint(object sender, PaintEventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("Clicking once");
}
Note I’ve only included the Panel and the stimulus. All other code in my program has not been included.
Thanks in advance for any help!
You could try this for example: