/**************************************************************************
* Expand the screen to fill the working screen size
and adjust the
* positions of controls accordingly. You will
have to adapt this to
* adapt this to your program; you cannot use it as it is.
It is meant
* only to show a general technique.
**************************************************************************/
private void expandScreen()
{
int iHeight = Screen.PrimaryScreen.WorkingArea.Height
- this.Height;
this.Height += iHeight;
attend1.Height += iHeight;
Point pt = panel1.Location;
pt.Y += iHeight;
panel1.Location = pt;
int iWidth = Screen.PrimaryScreen.WorkingArea.Width -
this.Width;
attend1.Width += iWidth;
this.Width += iWidth;
this.CenterToScreen();
}