Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Application C# that occupies all screen (full screen)

1 view
Skip to first unread message

Cristian Balcanu

unread,
Mar 23, 2005, 2:04:54 PM3/23/05
to
Hi

I want to make an application in C# that occupies all screen (full screen).
As is Internet Explorer when press F11 or Visual Studio on Ctrl-Shift-Enter.
What is the canonical way to accomplish that? Does the .NET BCL support
that? Are any links or tutorials available?

Cristi


Daisuke

unread,
Mar 23, 2005, 2:21:03 PM3/23/05
to
Simply set the form to WindowState.Maximized, and BorderStyle.None

Cristian Balcanu

unread,
Mar 23, 2005, 3:15:28 PM3/23/05
to
This doesn't work. A margin with about 3 pixels can be seen on right.

I also want to cover the windows task-bar.

Please provide another solution.

"Daisuke" <Dai...@discussions.microsoft.com> wrote in message
news:BF1BA482-0E19-4FDE...@microsoft.com...

Claudio Grazioli

unread,
Mar 23, 2005, 3:33:52 PM3/23/05
to

Following method switches a form in normal mode to full window mode and
vice versa.

private void menuItemFullWindow_Click(object sender, System.EventArgs e)
{
// if the window is in normal mode (sizable) change to full window mode
if (FormBorderStyle == FormBorderStyle.Sizable)
{
// disable the window border
this.FormBorderStyle = FormBorderStyle.None;

// safe the current position and size
m_Bounds = this.Bounds;

// resize the window to full screen size and make it top most
this.Bounds = Screen.PrimaryScreen.Bounds;
this.TopMost = true;
}
else // the window is already in full mode switch back to normal mode
{
// set the position and size back to the value before full window mode
this.Bounds = m_Bounds;

// enable the window border
this.FormBorderStyle = FormBorderStyle.Sizable;
}
} // menuItemFullWindow_Click()

hth
--
Claudio Grazioli
http://www.grazioli.ch

0 new messages