Thursday, July 8, 2010

Read-out Screen Resolution

The following code determines the current screen resolution:
int Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
int Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
MessageBox.Show("The screen resolution is: " + Width.ToString() + " * " + Height.ToString());

No comments:

Post a Comment