|
то есть часть экрана, не затененного панелью
задач или другими прикладными областями
Расположите на форме элемент CommandButton. 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 Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Sub Command1_Click()
Dim lngTop, lngLeft, lngRight, lngBottom As Long
Dim typRect As RECT
Call SystemParametersInfo(SPI_GETWORKAREA, vbNull, typRect, 0)
With typRect
lngTop = .Top
lngLeft = .Left
lngRight = .Right
lngBottom = .Bottom
End With
Print lngTop
Print lngLeft
Print lngRight
Print lngBottom
End Sub
|
|