AvailScreenSize




Option Explicit

Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private Const SPI_GETWORKAREA& = 48

Private Declare Function SystemParametersInfo Lib "user32" _
Alias "SystemParametersInfoA" _
(ByVal uAction As Long, _
ByVal uParam As Long, _
lpvParam As Any, _
ByVal fuWinIni As Long) As Long

Private Sub Form_Load()

Dim rc As RECT

Call SystemParametersInfo(SPI_GETWORKAREA, 0&, rc, 0&)

Me.Move rc.Left * Screen.TwipsPerPixelX, _
rc.Top * Screen.TwipsPerPixelY, _
rc.Right * Screen.TwipsPerPixelX, _
rc.Bottom * Screen.TwipsPerPixelY

End Sub










( availscreensize.html )- by Paolo Puglisi - Modifica del 17/12/2023