The following code resizes the Form Window to fit the entire screen .
int iWindowWidth = Screen.PrimaryScreen.Bounds.Width;
int iWindowHeight = Screen.PrimaryScreen.Bounds.Height;
this.Size = new Size(iWindowWidth, iWindowHeight ) ;
Useful to get maximum form size for an Windows application
ReplyDeletegetting error at screen..error(the screen does not exit in current context)
ReplyDelete