|
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWndParent As Long, ByVal hWndChildWindow As Long, ByVal lpClassName _ As String, ByVal lpsWindowName As String) As Long Const TB_SETSTYLE = WM_USER + 56 Const TB_GETSTYLE = WM_USER + 57 Const WM_USER = &H400 Const TBSTYLE_FLAT = &H800 '_________________________________________________________ '4. Add this Sub to the General Declarations Section as well: Public Sub SetTBar97(TBar As Toolbar) Dim lTBarStyle As Long, lTBarHwnd As Long lTBarHwnd = FindWindowEx(TBar.hWnd, 0&, "ToolbarWindow32", vbNullString) lTBarStyle = SendMessage(lTBarHwnd, TB_GETSTYLE, 0&, 0&) lTBarStyle = lTBarStyle Or TBSTYLE_FLAT SendMessage lTBarHwnd, TB_SETSTYLE, 0, lTBarStyle TBar.Refresh End Sub '_________________________________________________________ '5. Add a Module and add this to it: Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) _ As Long '6. You can make the Toolbars Off97 Style with: SetTBar97 Toolbar1 'Toolbar1, of course, being your toolbar control's name. |