Resumen ToolBar estilo Office 97

Esta manera de hacerlo no me acuerdo de donde la consegui pero te la
envio y creo que te resuelva lo que tu quieres.
No necesitas usar ningun control externo solo el toolbar de VB

Llamas :

Call Office97Toolbar(Me.Nombre de tu toolbar, 2)

(el segundo parametro es para el estilo de toolbar que usaras 1 o 2 que
ya veras en el SUB

Declaras estas API y constantes:


Private Declare Function SendMessage Lib "user32" Alias _
    "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _
    ByVal wParam As Integer, ByVal lParam As Any) As Long
Private 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

Private Const WM_USER = &H400
Private Const TB_SETSTYLE = WM_USER + 56
Private Const TB_GETSTYLE = WM_USER + 57
Private Const TBSTYLE_FLAT = &H800
Private Const TBSTYLE_LIST = &H1000



Copias estas SUB:

Public Sub Office97Toolbar(tlb As Toolbar, _
    tlbToolbarStyle As Long)
    Dim lngStyle As Long
    Dim lngResult As Long
    Dim lngHWND As Long

    ' Find child window and get style bits
    lngHWND = FindWindowEx(tlb.hwnd, 0&, _
        "ToolbarWindow32", vbNullString)
    lngStyle = SendMessage(lngHWND, _
        TB_GETSTYLE, 0&, 0&)

    ' Use a case statement to get the effect
    Select Case tlbToolbarStyle
    Case 1:
        ' Creates an Office 97 like toolbar
        lngStyle = lngStyle Or TBSTYLE_FLAT
    Case 2:
        ' Creates an Explorer 4.0 like toolbar,
        ' with text to the right
        ' of the picture. You must provide text
        ' in order to get the effect.
        lngStyle = lngStyle Or TBSTYLE_FLAT _
            Or TBSTYLE_LIST
    Case Else
        lngStyle = lngStyle Or TBSTYLE_FLAT
    End Select

    ' Use the API call to change the toolbar
    lngResult = SendMessage(lngHWND, _
        TB_SETSTYLE, 0, lngStyle)

    ' Show the effects
    tlb.Refresh
End Sub


    -----Original Message-----
    From:    Leo
    Sent:    Saturday, September 26, 1998 7:09 PM
    To:    Lista sobre Visual Basic 5
    Subject:    (VB-ESP) Pregunta sobre Tool Bar

    Quisiera saber como hago para crear una tool bar como la de Word
97.

    Si es posible con algun control gratuito.

    Gracias.

    



Resumen Resumen

Visual Basic Página de Visual Basic

Página principal Página principal

www.jrubi.com