I have a WinForms application.
Application has menustrip, toolstrip and several panels.
I want to stretch one of that panels on fullscreen. I want that panel covers all screen include taskbar.
How do I do it ?
============================================
I used an answer of Hans Passant:
public partial class Form1 : Form
{
Size _panel1Size;
public Form1()
{
InitializeComponent();
_panel1Size = panel1.Size;
}
void bFullScreen_Click(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
this.panel1.Size = this.ClientSize;
}
void bGoBack_Click(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.WindowState = FormWindowState.Normal;
panel1.Size = _panel1Size;
}
}