I am writing my application in C# in Microsoft Visual Studio and I am facing a problem. I wrote a code that when clicking on the PictureBox, the application should be minimized, but it doesn't. Here is my code:
private void pictureBox2_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}