Solved

How can i change my screen resolution in C# .net window application ??

Posted on 2011-02-24
2
735 Views
Last Modified: 2012-05-11
i want to change the resolution of my screen , but how can i do it ??

give me some suggestions .....
0
Comment
Question by:Parth48
2 Comments
 
LVL 14

Accepted Solution

by:
systan earned 500 total points
Comment Utility
0
 
LVL 5

Expert Comment

by:jarrod_williams
Comment Utility
Page_Load Code

Screen Srn = Screen.PrimaryScreen;

tempHeight = Srn.Bounds.Width;

tempWidth = Srn.Bounds.Height;

Page.ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script type=\"text/javascript\">alert('" + "Your Current Resolution  is = " + tempHeight + " * " + tempWidth + "');</script>");

//if you want Automatically Change res.at page load. please uncomment this code.

 

if (tempHeight == 600)//if the system is 800*600 Res.then change to

{

FixHeight = 768;

FixWidth = 1024;

Resolution.CResolution ChangeRes = new Resolution.CResolution(FixHeight, FixWidth);

}  

Change Resoultion  

switch (cboRes.SelectedValue.ToString())

{

    case "800*600":

        FixHeight = 800;

        FixWidth = 600;

        Resolution.CResolution ChangeRes600 = new Resolution.CResolution(FixHeight, FixWidth);

        break;

 

    case "1024*768":

        FixHeight = 1024;

        FixWidth = 768;

        Resolution.CResolution ChangeRes768 = new Resolution.CResolution(FixHeight, FixWidth);

        break;

    case "1280*1024":

        FixHeight = 1280;

        FixWidth = 1024;

        Resolution.CResolution ChangeRes1024 = new Resolution.CResolution(FixHeight, FixWidth);

        break;

}
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now