Setting the screen resolution through code.

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

Is there any way to set the screen resolution through code? I'd want to set
it to something 800x600 through a program. We have people who reset the
screen resolution to something the monitor won't handle (These are plasma
screens) and then they can't see anything. We'd like to default it back to
something (through a key stroke) that would be displayable.

TIA - Jeff.
 
Is there any way to set the screen resolution through code?

Yes, but it's not part of .NET. You'll need to use p/invoke or write your
own wrapper and access the Win32 API. See ChangeDisplaySettings and
related functions.

Pete
 
Back
Top