Funktionreferenz


_WinAPI_GetWorkArea


Retrieves the size of the working area on the primary display monitor

#include <WinAPISys.au3>
_WinAPI_GetWorkArea ( )

Parameter

None.

Rückgabewert

Success: $tagRECT structure that contains the screen coordinates of the working area.
Failure: Sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information.

Bemerkungen

None.

Siehe auch

Suche nach SystemParametersInfo in der MSDN Bibliothek.

Beispiel

#include <GUIConstantsEx.au3>
#include <WinAPISys.au3>
#include <WindowsConstants.au3>

_Example()

Func _Example()
    Local $tRECT = _WinAPI_GetWorkArea()
    Local $iWidth = DllStructGetData($tRECT, 'Right') - DllStructGetData($tRECT, 'Left')
    Local $iHeight = DllStructGetData($tRECT, 'Bottom') - DllStructGetData($tRECT, 'Top')
    Local $X = DllStructGetData($tRECT, 'Left')
    Local $Y = DllStructGetData($tRECT, 'Top')

    Local $hForm = GUICreate('Test ' & StringReplace(@ScriptName, '.au3', '()'), $iWidth, $iHeight, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST)
    GUISetBkColor(0, $hForm)
    WinSetTrans($hForm, '', 128)
    GUISetState(@SW_SHOW)

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>_Example