有人知道如何在没有窗口标题栏或任务栏的情况下在VBA中获得完全全屏吗?(我使用的是Windows 10 x64)
在我的研究中,我只找到了Windows XP和2000或其他旧版本Windows的代码。这是我找到的代码:
Public Declare PtrSafe Function SHAppBarMessage Lib "shell32.dll" (ByVal dwMessage As Long, pData As APPBARDATA) As LongPtr
Public Const ABM_GETSTATE = &H4
Public Const ABM_SETSTATE = &HA
Public Const ABS_AUTOHIDE = &H1
Public Const ABS_ALWAYSONTOP = &H2
Public Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Type APPBARDATA
cbSize As Long
hwnd As Long
uCallbackMessage As Long
uEdge As Long
rc As RECT
lParam As Long
End Type
Sub TaskbarAutohideOn()
Dim ABD As APPBARDATA
ABD.cbSize = Len(ABD)
SHAppBarMessage ABM_GETSTATE, ABD
ABD.lParam = ABS_AUTOHIDE
SHAppBarMessage ABM_SETSTATE, ABD
End Sub
Sub TaskbarAutohideOff()
Dim ABD As APPBARDATA
ABD.cbSize = Len(ABD)
SHAppBarMessage ABM_GETSTATE, ABD
ABD.lParam = ABS_ALWAYSONTOP
SHAppBarMessage ABM_SETSTATE, ABD
End Sub
1条答案
按热度按时间wfveoks01#
我找到了解决方案。此代码适用于Windows 10: