Working on a C# program which will take a screenshot for the user when a button is clicked, the issue I have is, if the Start Menu is open, clicking the button on the WinForms app closes the Start Menu before taking the screenshot, the method for capturing the screen I am using:
Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics gr = Graphics.FromImage(bmp);
gr.CopyFromScreen(0, 0, 0, 0, bmp.Size);
This is bound to the button click:
onClick(object sender, EventArgs e) {
My thoughts are I would need to somehow make the button clickable without gaining focus?