To understand what am i talking about, take a look at this video i recorded : https://youtu.be/JhRg1Iw2v2A
As you can see the PictureBox goes into the upper left corner when re-showing the pannel below the picture box and setting his size and anchors. The PictureBox don't autosize according to the form like before hidding the pannel below with the button
Here is my code :
private void b_disable_Click(object sender, EventArgs e)
{
if (p_Bar.Visible == true)
{
p_Bar.Visible = false;
pictureBox1.BringToFront();
button1.BringToFront();
pictureBox1.Dock = DockStyle.Fill;
}
else
{
p_Bar.Visible = true;
pictureBox1.SendToBack();
pictureBox1.Width = 784;
pictureBox1.Height = 370;
pictureBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
}
}
I hope that someone can help me and if my problem is solved, can help others persons in need. Thx and have a good day if you read this !