Reputation: 28648
I would like to disable displaying of the content of the window when resizing, is it possible? The problem is that when I'm resizing my window the controls redraw on correct positions but it doesn't look good because it's not done fluently.
EDIT: I would like a code that would manage the following scenario:
EDIT II:
I've got the MDI application and it doesn't support transparency for child windows
Upvotes: 2
Views: 1303
Reputation: 1200
An idea is to put all the controls in a panel and set it's visibility to false on the resize event of the form.
Edit: this will make the form transparent while resizing.
private void Form1_ResizeBegin(object sender, EventArgs e)
{
panel1.Visible = false;
Form1.ActiveForm.TransparencyKey = Color.Transparent;
}
private void Form1_ResizeEnd(object sender, EventArgs e)
{
panel1.Visible = true;
Form1.ActiveForm.TransparencyKey = Color.Gray; // or whatever color your form was
}
Upvotes: 3