First of all, I would like to talk about the application very briefly. There is a child form inside the main form in my application, and this child form also contains a datagridview. You can see the structure I'm talking about in the picture below.
I have a very secret and magic function. This function works with hotkey and the working time of the function is a bit long so I want to make a standby screen. When I press the hotkey, I want the datagridview to darken a little and the message "Please wait" appears in the middle of the childform. If you don't understand, please take a look at the picture below.
For this, I put a panel on the datagridview and set it to
panel.BackColor = Color.FromArgb(50, Color.Black);
panel.Visible = false;
also myFunction() does this.
private void myFunction()
{
panel.Visible = true;
// Top secret codes {...}
panelVisible = false;
}
But this method didn't work. The panel appears but it deletes the gridview behind it like this.
I searched a lot but couldn't solve the problem. Does anyone have a better method or solution suggestion?