Retrieve the current screen resolution
| C# Code Snippets |
| edit |
This C# code snippet allows the user to retrieve the users current screen resolution.
You can output the dimensions, in pixels, of the current video mode of the primary display to a messagebox using the following code.
MessageBox.Show( "Monitor Size:" + SystemInformation.PrimaryMonitorSize );
Alternatively, you can get the bounds of the virtual screen.
MessageBox.Show( "VirtualScreen: " + SystemInformation.VirtualScreen );
[edit]