How to

get screen size

Published: 12. January 2009 | Updated: 26. October 2011
License: Microsoft Public License (MS-PL)
Categories: GDI, Windows » Hardware
Tags: C# GDI Hardware Windows Winforms
Was this snippet helpful for you? YESYES / NONO
Get Analyzant!

Check your entire website from code to content in minutes with Analyzant, the free analysis suite.

Free download at

Import namespace

using System.Windows.Forms;


int height = Screen.PrimaryScreen.Bounds.Height;
int width = Screen.PrimaryScreen.Bounds.Width;
Send us feedback about this snippet »

Related Snippets: