Disablning/Enabling extended desktop in C#?

  • Thread starter Thread starter Josh Comley
  • Start date Start date
J

Josh Comley

Hello!

I have a problem, I can think of two methods for a solution, but cannot
figure out how to implement them correctly!

Aim:
To disable and later enable an extended desktop setting (TV-OUT of a
graphics card).

Idea 1:
Simply create a hotkey in the graphics card settings to switch between two
different display settings. SendKeys doesn't seem to do the trick, as I
think it sends the hotkey to ONLY the active Window therefore Windows
doesn't 'hear' it so to speak. Tried DllImport for SendMessage and
keybd_event functions, but cannot get either to do whats required. Anyone
know how to recreate a hotkey event in C#?

Idea 2:
Directly disable the extended desktop in C# and directly enabling it again
later by calling something like EnumDisplaySettingsEx in C++ (although tried
coding using EnumDisplaySettingsEx in C++ but can't get VC++6 to recognise
EnumDisplayDevices function!!??

Obviously the best method if possible is the latter, but any help on either
would be much appreciated!

Josh
 
Back
Top