I’ve found nice examples using C++ (http://www.codeproject.com/KB/tips/resswitch.aspx), but not in C#.
Can someone help, please?
Edit: The exact function that list the video modes is:
BOOL CVideoModes::GetAvailableVideoModes(CAvailableVideoModes& modes) { modes.SetSize(0, 5); int i=0; DEVMODE dm; while (EnumDisplaySettings(NULL, i, &dm)) { CVideoMode thismode(dm.dmBitsPerPel, dm.dmPelsWidth, dm.dmPelsHeight, dm.dmDisplayFrequency); modes.SetAtGrow(i, thismode); ++i; } modes.FreeExtra(); return (i>0); }
But sincerelly I cannot understand that C++ code. Where I can find that ‘thismode’ function?
If you mean video modes are available resolutions, try to invoke
EnumDisplaySettingsExdetails can be found here:
http://msdn.microsoft.com/en-us/library/dd162612(VS.85).aspx
small program that lists available resolutions: