Solved

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

Posted on 2011-02-24
2
746 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
ID: 34969043
0
 
LVL 5

Expert Comment

by:jarrod_williams
ID: 34969132
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 our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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