Windows Develop Bookmark and Share   
 index > Windows Forms General > Make form run in full sceen
 

Make form run in full sceen

Hi, I'm making an application what will runon a touchscreen, and the application needs to cover the whole screen, Could somebody please tell me if there is a way to do this, I would also appreciate it if you have any advise on developing touchscreen application since this would be my first one. Thank you in advance!
S10n  Friday, January 26, 2007 4:51 PM

Add the following to your form:

protected override void OnLoad(EventArgs e)

{

base.OnLoad(e);

FormBorderStyle = FormBorderStyle.None; // hide the form border

Bounds = Screen.FromControl(this).Bounds; // make the form as big as the screen

}

As for making touchscreen applications: just make sure your buttons and other display elements are big enough to be touched with a finger without touching other nearby controls !

Mike Danes  Friday, January 26, 2007 8:05 PM

Add the following to your form:

protected override void OnLoad(EventArgs e)

{

base.OnLoad(e);

FormBorderStyle = FormBorderStyle.None; // hide the form border

Bounds = Screen.FromControl(this).Bounds; // make the form as big as the screen

}

As for making touchscreen applications: just make sure your buttons and other display elements are big enough to be touched with a finger without touching other nearby controls !

Mike Danes  Friday, January 26, 2007 8:05 PM
What's the difference between:

WindowState = FormWindowState.Maximized;

and:

Bounds = Screen.FromControl(this).Bounds;

?
nahguam  Friday, January 26, 2007 8:47 PM

Not much. I'm setting the Bounds to Screen.Bounds just to make sure that the form covers the task bar.

Mike Danes  Friday, January 26, 2007 8:52 PM
Ah ok. ty
nahguam  Friday, January 26, 2007 8:59 PM
It worked, thank you so much for your help.
S10n  Friday, January 26, 2007 9:24 PM

You can use google to search for other answers

Custom Search

More Threads

• Vertical Scrollbar for MessageBox/MsgBox
• Display Powerpoint Viewer 2007 In Windows Form
• Reading text file, bottom up
• Confusion with MAPI int .NET 2.0
• Unable to Click "ADD" button using the "spacebar" key in CollectionEditor
• How to intercept a keyboard input on a form regardless of the focus of the control?
• Form Security
• question on modal forms and events
• Best Practices Disposing under inherited controls
• Windows forms or ASP.net