3D Toolbar Controls (16/32 bit) 
Author Message
 3D Toolbar Controls (16/32 bit)

Does anyone know of a 3D Toolbar Control (i.e. with buttons that are
usually flat to the screen but pop up when the mouse moves over them like
the toolbar in IE3) that is available in both 16bit and 32bit versions for
VB4? Freeware would be nice :)


Sat, 13 Jan 2001 03:00:00 GMT  
 3D Toolbar Controls (16/32 bit)
On Tue, 28 Jul 1998 08:56:52 GMT, S.Kirk pondered:

Quote:
> Does anyone know of a 3D Toolbar Control (i.e. with buttons that are
> usually flat to the screen but pop up when the mouse moves over them like
> the toolbar in IE3) that is available in both 16bit and 32bit versions for
> VB4? Freeware would be nice :)

Just use an ordinary toolbar with this code:
---
Put this in a module:

--- Start ---
Option Explicit
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 _
 hWndParent As Long, ByVal hWndChildWindow As Long, ByVal lpClassName
As String, ByVal lpsWindowName As _
 String) As Long

Const WM_USER = &H400
Const TB_SETSTYLE = WM_USER + 56
Const TB_GETSTYLE = WM_USER + 57

Const TBSTYLE_FLAT = &H800

Private Flat As Boolean

Public Sub SetFlatBar(tb As Toolbar, NewStyle As Boolean)
    Dim tbStyle As Long, tbHwnd As Long
    'Find handle to toolbar
    tbHwnd = FindWindowEx(tb.hWnd, 0&, "ToolbarWindow32",
vbNullString)
    'Get window style
    tbStyle = SendMessage(tbHwnd, TB_GETSTYLE, 0&, 0&)
    If NewStyle = True Then
        tbStyle = tbStyle Or TBSTYLE_FLAT
    Else
        tbStyle = tbStyle And Not TBSTYLE_FLAT
    End If
    'Set new style
    Call SendMessage(tbHwnd, TB_SETSTYLE, 0, tbStyle)
    tb.Refresh
End Sub
--- End ---

No add the component  Microsoft Windows Common Controls 5.0 to your
project and put a toolbar on your form (name it "Toolbar1"). Create
some picture buttons.

In the Form_Load Event put:

SetFlatBar Toolbar1, True

That's it!
---

That's the second time I've posted this code this evening - is the FAQ for this
group still updated? It seems to rarely get a mention these days. Perhaps we
should start a new FAQ...

HTH,
Alex
--
Alex Warren

http://come.to/axe           - Axe Software: freeware for DOS & Windows
http://come.to/basixfanzine  - Basix Fanzine: magazine for BASIC programmers
http://members.tripod.com/~perditionproductions           - mods (IT format)
-----------------------------------------------------------------------------
(please reply to the newsgroup - if you must reply by email, change the anti-
spam rubbish to the email address above)



Sat, 13 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB 4.0 (16-Bit)/Crystal Reports 3.0.1.32 (16-Bit) Print Preview Maximize Window

2. corruption of 16 bit db when used by both 16 and 32 bit apps

3. Multimedia control for Visual Basic (16 bit or 32 bit)

4. Avoiding load of 32-bit custom control using 16-bit Visual Basic 4.0

5. 8-bit, 16-bit & 32-bit Colour

6. Sheridan 3D controls 32 bit Grid control

7. API Conversion 16 bit to 32 bit

8. Combining 16 bit and 32 bit

9. Help..-NT 4.0-ISA access with 16 Bit GFA and 32 Bit DLL

10. 32-Bit to 16-Bit

11. VB 4.0 16 bit or 32 bit Escape Key

 

 
Powered by phpBB® Forum Software