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 ) ;
Visual Studio .NET Tips and Tricks, VB.NET Code Samples, C# Code Snippets, ASP.NET Code Samples, .NET Tips and Tricks, C# Tips & Tricks, Visual Studio 2010, .NET Framework Code Samples, VB.NET Tips & Tricks
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