The following Form-derived class illustrates a problem I
am having when a ToolBar is instanced at the bottom of a
Form with a simple Panel at the top. When this form is
minimized and then restored, the layout logic leaves the
Panel not fully occupying the available client area. The
amount of dead space at below the panel depends on the
number of buttons instanced on the ToolBar. If no buttons
are used, the layout is correct.

Any ideas?
==============Form1.cs===================================
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace WindowsApplication2
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.ToolBar
toolBar1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ToolBarButton
toolBarButton1;
private System.Windows.Forms.ToolBarButton
toolBarButton2;
private System.Windows.Forms.ToolBarButton
toolBarButton3;
private System.Windows.Forms.ToolBarButton
toolBarButton4;
private System.Windows.Forms.ToolBarButton
toolBarButton5;
private System.Windows.Forms.ToolBarButton
toolBarButton6;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container
components = null;

public Form1()
{
//
// Required for Windows Form
Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code
after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool
disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose
();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated
code
/// <summary>
/// Required method for Designer support -
do not modify
/// the contents of this method with the
code editor.
/// </summary>
private void InitializeComponent()
{
this.toolBar1 = new
System.Windows.Forms.ToolBar();
this.panel1 = new
System.Windows.Forms.Panel();
this.toolBarButton1 = new
System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new
System.Windows.Forms.ToolBarButton();
this.toolBarButton3 = new
System.Windows.Forms.ToolBarButton();
this.toolBarButton4 = new
System.Windows.Forms.ToolBarButton();
this.toolBarButton5 = new
System.Windows.Forms.ToolBarButton();
this.toolBarButton6 = new
System.Windows.Forms.ToolBarButton();
this.SuspendLayout();
//
// toolBar1
//
this.toolBar1.Buttons.AddRange(new
System.Windows.Forms.ToolBarButton[] {



this.toolBarButton1,



this.toolBarButton2,



this.toolBarButton3,



this.toolBarButton4,



this.toolBarButton5,



this.toolBarButton6});
this.toolBar1.Dock =
System.Windows.Forms.DockStyle.Bottom;
this.toolBar1.DropDownArrows =
true;
this.toolBar1.Location = new
System.Drawing.Point(0, 407);
this.toolBar1.Name = "toolBar1";
this.toolBar1.ShowToolTips = true;
this.toolBar1.Size = new
System.Drawing.Size(696, 28);
this.toolBar1.TabIndex = 0;
//
// panel1
//
this.panel1.BackColor =
System.Drawing.SystemColors.Info;
this.panel1.Dock =
System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new
System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new
System.Drawing.Size(696, 407);
this.panel1.TabIndex = 1;
//
// Form1
//
this.AutoScaleBaseSize = new
System.Drawing.Size(5, 13);
this.ClientSize = new
System.Drawing.Size(696, 435);
this.Controls.Add(this.panel1);
this.Controls.Add(this.toolBar1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the
application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}