SPI_GETWORKAREA from Monitor

Please share your functions/code-snips

SPI_GETWORKAREA from Monitor

Postby pvl » Tue Apr 17, 2012 1:52 pm

[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
pvl
 
Posts: 7
Joined: Mon Jul 18, 2011 9:20 am
Location: Belgium

Return to User-Functions

cron