Here is how I do it:
- add standard checkbox to your form
- assign "placeholder" key to one of your toolbar buttons
- use code similar to this:
Code:
Option Explicit
Private Declare Function SetParent Lib "user32" _
(ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Form_Load()
With Toolbar1
.Buttons("placeholder").Style = tbrPlaceholder
.Buttons("placeholder").Width = Check1.Width + 120
Set Check1.Container = Toolbar1
'SetParent Check1.hWnd, Toolbar1.hWnd
Check1.Move .Buttons("placeholder").Left + 120, (.Height - Check1.Height) / 2
Check1.ZOrder
End With
End Sub
NOTE: you can use Container or SetParent - I gave you both options but it's your choice.