Check for the screen resolution.
i want that the applicaton i'v created in visual studio using c# to check the screen resolution that is running on the client computer before it runs,if the screen resoluton is less than 1366*768 than i want my program to say that the screen resolution is too small.and stop executing.

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 23, 2013, 9:08 PM EDT
Refer to this link
http://tutorials.csharp-online.net/Retrieve_the_current_screen_resolution
The C# code snippet below retrieves the screen resolution of the system.
using System.Windows.Forms;//namespace
int deskHeight = Screen.PrimaryScreen.Bounds.Height;
int deskWidth = Screen.PrimaryScreen.Bounds.Width;
MessageBox.Show("Your screen resolution is " + deskWidth + "x" + deskHeight);
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 23, 2013, 8:56 PM EDT
You can try like this
var width = parseInt(screen.width);
Regards,
Iftikar
Stark38 reputationPosted Aug 23, 2013, 9:05 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 23, 2013, 9:07 PM EDT
Refer to this link
http://tutorials.csharp-online.net/Retrieve_the_current_screen_resolution
The C# code snippet below retrieves the screen resolution of the system.
using System.Windows.Forms;//namespace
int deskHeight = Screen.PrimaryScreen.Bounds.Height;
int deskWidth = Screen.PrimaryScreen.Bounds.Width;
MessageBox.Show("Your screen resolution is " + deskWidth + "x" + deskHeight);
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 23, 2013, 9:17 PM EDT
int deskHeight = Screen.PrimaryScreen.Bounds.Height;
int deskWidth = Screen.PrimaryScreen.Bounds.Width;
if (deskWidth < 1366 && deskHeight < 768)
{
MessageBox.Show("too low screen resolution");
}
Stark38 reputationPosted Aug 23, 2013, 9:24 PM EDT