UtilDisplayGetRealPrimaryScreen Method

Gets a Screen object that represents the primary device.

You must always call GetRealPrimaryScreen function instead of PrimaryScreen, which does not properly update the class members after a display change:

https://stackoverflow.com/questions/67061729/system-windows-forms-screen-is-not-updating-after-a-display-change

https://stackoverflow.com/questions/7901247/screen-allscreens-bug-and-posting-a-wm-displaychange-to-a-single-winform-applic

Definition

Namespace: DevCase.Core.IO.Devices.Display
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Screen GetRealPrimaryScreen()

Return Value

Screen
The resulting Screen object.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also