How does one get the screen resolution of the current monitor? By "current monitor", I mean the one that the application starts on.
The reason I ask this is because I have two monitors, the secondary monitor is 1280x1024 and the primary is 1680x1050. The application, when it starts, stupidly sets its own height and width based on the primary monitor resolution. When the application launches on the secondary monitor, it overflows the resolution, which looks strange.
I know I could change/remove the code that sets the application's height/width, but I am also curious how one determines which monitor the application is showing on.
For what it's worth, I am not a proponent of applications that set their own height/width.
Screen resolution Monitor, Telivision, Mobile device or any display device is the number of pixels in x and y dimensions. The Screen resolution is generally measured as width x height in pixels. For example resolution 1920 x 1080 means the 1920 pixels is width and 1080 pixels is height of the screen.
Windows 10 users should follow the below steps to find the monitor resolution. Press the “Start key + I” shortcut. Select “System.” Select “Display” on the sidebar. You will see the current display resolution under the “Display resolution” section. Your actual screen resolution is labeled with the “recommended” tag in the dropdown menu.
This native resolution indicates the maximum number of pixels it can accommodate when displaying an image. For example, a Full HD monitor has a native resolution of 1920x1080, i.e. it supports a maximum of 1920 horizontal pixels and 1080 vertical pixels.
That means any full HD resolution monitor you come across has 1,920 pixels horizontally and 1,080 pixels vertically. Also in modern-day monitors, there are some popular ratios of resolution widely available on the market. Some of the most popular screen resolutions are is720p, 1080p, 1440p, 2K, and 4K.
Use Screen.FromControl
:
Screen.FromControl(this).Bounds
where this
is the Form
that you want to retrieve the Screen
information for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With