Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find out the screen resolution

Status
Not open for further replies.

vatawna

Programmer
Feb 24, 2004
67
0
0
US
Does anyone know how to find out the screen resolution programmatically from asp.net?

Thanks.
 
using System;
using System.Drawing;
using System.Windows.Forms;

public class GetScreenRes {

public static void Main() {

int xSize = SystemInformation.PrimaryMonitorSize.Width;
int ySize = SystemInformation.PrimaryMonitorSize.Height;

Console.WriteLine("The screen is {0} x {1}", xSize, ySize);
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top