views:

53

answers:

2

I have a C# WPF application, I want it, when launched, to change the screen resolution if it is not what it should work on, like the games.

I know how to retrieve the screen resolution, but I don`t know how to set it to what I want.

NOTE: I`m not working with ASP or WEB, just a desktop APP

+1  A: 

Why do you require this.

I think you should not do this, rather you can build the application within a ViewBox and which let you create Resolution Independent UI.

Please check my article : http://www.dotnetfunda.com/articles/article827-resolution-independent-ui-.aspx

abhishek
@abhishek: can scroll bars replace the view box?
sikas
Hey, if you want your application to have scrollbar, just create your application in such a way that each ScrollViewer you place inside the box will have its minimum height and width. Yes, I have been using ViewBox extensively, and it works really well for us.
abhishek
+2  A: 
Nick Brooks