The Screen object provides information about the client's system, platform, screen and its rendering abilities. The properties of the Screen object are read-only.

 

Dim f$, h%, s$, v#

 

' System info

s$ = Screen.WinVer            ' String containing Windows version

h% = Screen.Arrange           ' Specifies how the system arranged minimized windows

h% = Screen.CleanBoot         ' Specifies how the system was started: 0 Normal boot, 1 Fail-safe boot, 2 Fail-safe with network boot

h% = Screen.Network           ' Least significant bit is set if a network is present; otherwise, it is cleared.

h% = Screen.PenWindows        ' TRUE the Microsoft Windows for Pen computing extensions are installed.

h% = Screen.Secure            ' TRUE if security is present.

h% = Screen.ShowSounds        ' TRUE to present information visually in situations where it would otherwise present the information only in audible form.

h% = Screen.SlowMachine       ' TRUE if the computer has a low-end (slow) processor.

h% = Screen.dbcsEnabled       ' TRUE if User32.dll supports DBCS

h% = Screen.DEBUG             ' TRUE if the debug version of User.exe is installed

h% = Screen.MenuDropAlignment ' TRUE if drop-down menus are right-aligned

h% = Screen.MidEastEnabled    ' TRUE if the system is enabled for Hebrew and Arabic languages.

 

v# = Screen.CommCtlVersion

v# = Screen.ShellVersion

 

' Metrics info

h% = Screen.cMetrics

h% = Screen.PixelsPerTwipX

h% = Screen.PixelsPerTwipY

h% = Screen.TwipsPerPixelX

h% = Screen.TwipsPerPixelY

h% = Screen.HimetsPerTwip

h% = Screen.TwipsPerHimet

 

' Screen size

h% = Screen.cxScreen      : h% = Screen.cyScreen      ' in pixels (GetDeviceCaps(hdc, HORZRES/VERTRES)

h% = Screen.Height        : h% = Screen.Width         ' in Twips (OCX compatible)

h% = Screen.x             : h% = Screen.y             ' (again) in Pixels

 

h% = Screen.hWnd                ' Desktop window handle

h% = Screen.GetDC               ' Get DC of desktop window

h% = Screen.ReleaseDC           ' Release desktop DC

 

' Free screen surface (work area) for applications.

h% = Screen.WorkLeft            ' Pixels

h% = Screen.WorkTop             ' Pixels

h% = Screen.WorkWidth           ' Pixels

h% = Screen.WorkHeight          ' Pixels

 

' Window metrics (see Windows API GetSystemMetrics() for more information)

h% = Screen.cxBorder      : h% = Screen.cyBorder

h% = Screen.cxCursor      : h% = Screen.cyCursor

h% = Screen.cxDlgFrame    : h% = Screen.cyDlgFrame

h% = Screen.cxDoubleClk   : h% = Screen.cyDoubleClk

h% = Screen.cxDrag        : h% = Screen.cyDrag

h% = Screen.cxEdge        : h% = Screen.cyEdge

h% = Screen.cxFixedFrame  : h% = Screen.cyFixedFrame

h% = Screen.cxFrame       : h% = Screen.cyFrame

' Width and height of the client area for a full-screen

h% = Screen.cxFullScreen  : h% = Screen.cyFullScreen 

h% = Screen.cxHScroll     : h% = Screen.cyHScroll

h% = Screen.cxHThumb      : h% = Screen.cyVThumb

h% = Screen.cxIcon        : h% = Screen.cyIcon

h% = Screen.cxIconSpacing : h% = Screen.cyIconSpacing

h% = Screen.cxMaximized   : h% = Screen.cyMaximized

h% = Screen.cxMaxTrack    : h% = Screen.cyMaxTrack

h% = Screen.cxMenuCheck   : h% = Screen.cyMenuCheck  

h% = Screen.cxMenuSize    : h% = Screen.cyMenuSize   

' Minimum width and height of a window, in pixels.

h% = Screen.cxMin         : h% = Screen.cyMin        

' Dimensions of a minimized window, in pixels

h% = Screen.cxMinimized   : h% = Screen.cyMinimized  

' Dimensions of a grid cell for a minimized window, in pixels.

h% = Screen.cxMinSpacing  : h% = Screen.cyMinSpacing 

' Minimum tracking width and height (size) of a window, in pixels.

h% = Screen.cxMinTrack    : h% = Screen.cyMinTrack   

' Width and height of a button in a window's caption or title bar, in pixels.

h% = Screen.cxSize        : h% = Screen.cySize       

h% = Screen.cxSizeFrame   : h% = Screen.cySizeFrame

h% = Screen.cxsmIcon      : h% = Screen.cysmIcon

h% = Screen.cxsmSize      : h% = Screen.cysmSize

h% = Screen.cxVScroll     : h% = Screen.cyVScroll

 

' Mouse properties

h% = Screen.MousePresent        ' Mouse present?

h% = Screen.cMouseButtons       ' Number of buttons on mouse

h% = Screen.SwapButton          ' Butons swapped?

 

' GFA-BASIC OCX mouse properties

Local mc As MouseCursor : Set mc = Screen.MouseCursor

'Local mi As mouseicon : Set mi = Screen.MouseIcon

h% = Screen.MousePointer       

h% = Screen.MouseX              ' Mouse screen x-position in pixels

h% = Screen.MouseY              ' Mouse screen y-position in pixels

h% = Screen.MouseK              ' Mouse button state

h% = Screen.ShiftKeys           ' Shift, Ctrl and Alt status

  

' Installed fontname array with UBound(Screen.FontCount)

Local i As Integer

For i = 0 To Screen.FontCount - 1

s$ = Screen.Fonts(i)

Next

 

There is one Screen object only. You cannot like the App object assign the Screen object to a variable of the Screen type, simply because GFA-BASIC doesn’t define a Screen type.