C# / XNA - Device Enumeration
Graphics cards support a variety of resolutions, refresh rates, and aspect ratios. In order to determine which display modes are available. The following function generates these display modes, and enters them into a List of type DisplayMode . List dmList = new List (); public void GetDeviceEnumeration() { foreach (DisplayMode dm in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes) dmList.Add(dm); } Once the List of DisplayMode s is obtained, simply iterate through the available display modes, and populate some sort of user interface control, such as a listbox, combobox, etc, allowing users to select which resolution they want to use. The following options can be accessed through the DisplayMode: Width, Height, AspectRatio, and Format. Width: Available Screen Width. Height: Available Screen Height. Format: Available Surface Format. (Commonly used: COLOR , and BRG565 .) Aspect Ratio: Common Aspect Ratios below, Regular and Widescreen. Widescreen ...