PictureDisabled Example VB

This example demonstrates how to use the PictureUp, PictureDown, and PictureDisabled properties to display the appropriate bitmap images on an Image Annotation Tool Button control.

PictureUp Sets the bitmap picture that is displayed when the button is enabled, but not selected.

PictureDown Sets the bitmap picture that is displayed when the button is selected.

PictureDisabled Sets the bitmap picture that is displayed when the button is disabled.

Private Sub frmToolPal_Load()
    'When using the annotation control to create a custom
    'tool palette, you can designate bitmaps to be used on
    'the tools when they are in various states. If these
    'values are not specified, default values will be used.
    'Note that it may be more efficient to set these
    'properties at design time.

    'Defines what picture will be shown if the button is
    'enabled
    ImgAnnTool1.PictureUp = LoadPicture("D:\yourapp\lineup.bmp")

    'Defines what picture will be shown when the button is
    'selected
    ImgAnnTool1.PictureDown = LoadPicture("D:\yourapp\linedown.bmp")

    'Defines what picture will be shown when the button is
    'disabled (grayed)
    ImgAnnTool1.PictureDisabled = LoadPicture("D:\yourapp\lineoff.bmp")
End Sub