Windows Phone Developers

Showing posts with label How to get desktop screen size using C#. Show all posts
Showing posts with label How to get desktop screen size using C#. Show all posts

Tuesday, August 24, 2010

How to Get Width and Height of Desktop Screen using C#/VB.NET

How to resize Windows form to fit Windows screen using C#/VB.NET

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 ) ;
Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon