Wednesday, February 22, 2012

SystemParameters Screen Resolutions WPF

(From MSDN)
MaximizedPrimaryScreenHeight (MX)
Gets a value that indicates the height, in pixels, of a maximized top-level window on the primary display monitor.

FullPrimaryScreenHeight  (FP)
Gets the height, in pixels, of the client area for a full-screen window on the primary display monitor.

PrimaryScreenWidth (P)
Gets a value that indicates the screen width, in pixels, of the primary display monitor.

VirtualScreenHeight (V)
Gets a value that indicates the height, in pixels, of the virtual screen.
The virtual screen is the bounding rectangle of all display monitors. The VirtualScreenTop and VirtualScreenLeft metrics are the coordinates of the upper-left corner of the virtual screen.

WorkArea (W)
Gets the size of the work area on the primary display monitor.
The work area is the portion of the screen that is not obscured by the system taskbar or by application desktop toolbars.

My screen resolution: 1920 x 1080 pixels * 2 monitors = 3840 x 1080 pixels

(MX)   1936 x 1066
(FP)   1920 x 1028
(P)     1920 x 1080
(V)      3840 x 1080
(W)    1921 x 1051

Remote desktop to my computer: 1680 x 1050 pixels

(MX)   1696 x 1036
(FP)   1680 x 998
(P)     1680 x 1050
(V)     1680 x 1050
(W)    1681 x 1021


    Public Sub UIControllerDisplaySizes()

        MessageBox.Show("MaximizedPrimaryScreenWidth" & ": " & SystemParameters.MaximizedPrimaryScreenWidth & vbNewLine &

                        "MaximizedPrimaryScreenHeight" & ": " & SystemParameters.MaximizedPrimaryScreenHeight & vbNewLine &

                        "FullPrimaryScreenWidth" & ": " & SystemParameters.FullPrimaryScreenWidth & vbNewLine &

                        "FullPrimaryScreenHeight" & ": " & SystemParameters.FullPrimaryScreenHeight & vbNewLine &

                        "PrimaryScreenWidth" & ": " & SystemParameters.PrimaryScreenWidth & vbNewLine &

                        "PrimaryScreenHeight" & ": " & SystemParameters.PrimaryScreenHeight & vbNewLine &

                        "VirtualScreenWidth" & ": " & SystemParameters.VirtualScreenWidth & vbNewLine &

                        "VirtualScreenHeight" & ": " & SystemParameters.VirtualScreenHeight & vbNewLine &

                        "WorkArea.Width" & ": " & SystemParameters.WorkArea.Width & vbNewLine &

                        "WorkArea.Height" & ": " & SystemParameters.WorkArea.Height & vbNewLine &

                        "IsRemotelyControlled" & ": " & SystemParameters.IsRemotelyControlled & vbNewLine

                        )

    End Sub



No comments:

Post a Comment