Article ID: 150704
Article Last Modified on 7/13/2004
Option Explicit
Private Sub Command1_Click()
Dim i As Integer
Dim ImgX As ListImage
Dim tbButton As Button
Set ImgX = ImageList1.ListImages.Add(, , _
LoadPicture("C:\Visual Basic\Icons\Industry\bicycle.ico"))
' Modify the argument for the LoadPicture function to point to
' directory containing an icon.
On Error Resume Next
Form1.Toolbar1.ImageList = ImageList1
' Comment the next line to workaround problem.
Set tbButton = Form1.Toolbar1.Buttons.Add(1, , "Node1", , 2)
' Uncomment one of the following lines to workaround problem.
' Uncomment this line if you want the image to appear on the
' button.
' Set tbButton = Form1.Toolbar1.Buttons.Add(1, , "Node1", , 1)
' Uncomment this line if you want a blank button
' Set tbButton = Form1.Toolbar1.Buttons.Add(1, , "Node1")
MsgBox "Number of Buttons according to Count Property: " & _
Toolbar1.Buttons.Count
End Sub
Additional query words: kbVBp400bug kbVBp500fix kbVBp kbdsd kbDSupport kbControl
Keywords: kbbug kbfix kbvbp500fix KB150704