1

IDE: VS2010, c#.net 4.0, winforms

My application is build on 1366x768 screen resolution. And I have another samsung LCD, which is having highest resolution -> 1920x1080, but in option list (Right click Desktop->Screen Resolution) it is not having 1366x768 resolution, So is there any way to force this lcd display to 1366x768 resolution so my application can get fits to that LCD, Operating system is Windows 7.

Hamid Pourjam
  • 20,441
  • 9
  • 58
  • 74
yogeshkmrsoni
  • 315
  • 7
  • 21
  • 2
    I do not think tampering with user resolution is a good idea. Personally I will not be happy if an application keeps changing my resolution. Considering people do a lot of stuff on screen at the same time, you will distort every other window. Still you may take a look at: https://stackoverflow.com/questions/215412/programmatically-change-screen-resolution – mcy Jun 29 '15 at 12:26

2 Answers2

4

You can do a lot by using nircmd

nircmd.exe setdisplay 1366 768 32

Also it is not programmatically but you can start a Process and call this utility.

Forcing the user to change the resolution is not a good practice. Try adapting your design to support different resolution.

Also you can not force a monitor to change it's resolution to something it does not support.

Community
  • 1
  • 1
Hamid Pourjam
  • 20,441
  • 9
  • 58
  • 74
0

As pointed int by Ferruccio in another question:

You can use EnumDisplayDevices to figure out what displays you have available and EnumDisplaySettings to get a list of available resolutions for your displays. Use ChangeDisplaySettings to set the resolution you need.

Community
  • 1
  • 1
Litisqe Kumar
  • 2,512
  • 4
  • 26
  • 40