Makes the toolbar control flat, like IE4.
Makes the toolbar control flat, like IE4.
API Declarations
Public Const WM_USER = &H400
Public Const TB_SETSTYLE = WM_USER + 56
Public Const TB_GETSTYLE = WM_USER + 57
Public Const TBSTYLE_FLAT = &H800
Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long
Rate Makes the toolbar control flat, like IE4.
(1(1 Vote))
Dim style As Long
Dim hToolbar As Long
Dim r As Long
'get the handle of the toolbar
hToolbar = FindWindowEx(Toolbar1.hwnd, 0&, "ToolbarWindow32", vbNullString)
'retreive the toolbar styles
style = SendMessageLong(hToolbar, TB_GETSTYLE, 0&, 0&)
'Set the new style flag
If style And TBSTYLE_FLAT Then
style = style Xor TBSTYLE_FLAT
Else
style = style Or TBSTYLE_FLAT
End If
'apply the new style to the toolbar
r = SendMessageLong(hToolbar, TB_SETSTYLE, 0, style)
End Sub
Makes the toolbar control flat, like IE4. Comments
No comments yet — be the first to post one!
Post a Comment