Sunday, 30 December 2012 13:56

how to run c# desktop application with full screen

Written by 
Rate this item
(0 votes)

If you want to run your software with same width and
height as your monitor's width and height then
implement the following technique in your application-

at first go to your your main StartUp form.add the
following codes under your mainForm_Load method -

private void mainForm_Load(object sender, System.EventArgs e)
{
//setup screen size first
int scrHeight = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height;
int scrWidth = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width;
this.Size = new Size(scrWidth , scrHeight);//this sets
}

Read 4623 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest discussions

  • No posts to display.