Page 1 of 1

SPI_GETWORKAREA from Monitor

PostPosted: Tue Apr 17, 2012 1:52 pm
by pvl
[code][/code]


Class user32 Alias Lib "user32.dll"

Public Static Function SystemParametersInfo Alias "SystemParametersInfoA" _
(ByVal uAction As Integer, _
ByVal uparam As Integer, _
ByRef lpvParam As Any, _
ByVal fuWinIni As Integer) As Integer

End Class

In Form_OnOPen ()

RetVal = user32.SystemParametersInfo(SPI_GETWORKAREA,0,WorkArea,0)

SL = WorkArea.Left
ST = WorkArea.Top
SR = WorkArea.Bottom
SB = WorkArea.Right

Print "SL " & SL
Print "ST " & ST
Print "SB " & SB
Print "SR " & SR

In Variable def's

Public Const SPI_GETWORKAREA = 48
Type RECT
Left as Integer
Top As Integer
Bottom as Integer
Right As Integer
End Type
Public WorkArea As RECT
Public Retval As Integer