Control

Toolbar ActiveX control - version 5.0

File

COMCTL32.OCX

Panel control name

ToolBar1

Script

Code

Display About box

ToolBar1.AboutBox

Add a button

ToolBar1.Buttons.Add &(1:),,&(2:),CInt(&(3:)),CInt(&(4:))
Parameters:
&(1:)= Integer - Button identifier
&(2:)=Character - Button text
&(3:)=Integer - Button style
&(4:)=Integer - Button image from associated Image list control

Clear

ToolBar1.Buttons.Clear

Events

ToolBar1.ImageList = ImageList1
Sub Toolbar1_ButtonClick(Button)
Set &(1:) = Button.Index
Set &(2:) = Button.Caption
Ad.LogicalEvent("ToolBar1ButtonClick")
End Sub
Sub Toolbar1_Change
Ad.LogicalEvent("ToolBar1Changed")
End Sub

Parameters:
&(1:)= Integer - Pressed Button identifier
&(2:)=Character - Button text

Refresh

ToolBar1.Refresh

Remove button

ToolBar1.Buttons.Remove &(1:)
Parameters:
&(1:)=Iinteger. Button to remove.

Restore

ToolBar1.RestoreToolBar &(1:),&(2:),&(3:)
Parameters:
&(1:)=Character - Registry Major Key
&(2:)=Character - Registry Subkey
&(3:)=Character - Registry Value to retrieve toolbar settings

Save ToolBar1.SaveToolBar &(1:),&(2:),&(3:)
Parameters:
&(1:)=Character - Registry Major Key
&(2:)=Character - Registry Subkey
&(3:)=Character - Registry Value to save toolbar settings