Available in the LEADTOOLS Imaging toolkit. |
Create example for Visual Basic
Private Sub Command1_Click()
LEAD1.AutoPan = False
LEAD1.AnnToolbar.Visible = False
LEAD1.AnnToolbar.Create 0, 0, ANNTOOLALIGN_TOP + ANNTOOLALIGN_LEFT
LEAD1.AnnToolbar.AutoSetTool = True
LEAD1.AnnToolbar.ButtonTool(LEAD1.AnnToolbar.ButtonCount) = ANNTOOL_USER_FIRST
LEAD1.Load "d:\ltwin14x\images\Ulay1.bmp", 0, 0, 1
LEAD1.AnnToolbar.ButtonBitmapUp(LEAD1.AnnToolbar.ButtonCount) = LEAD1.Bitmap
LEAD1.Load "d:\ltwin14x\images\Ulay2.bmp", 0, 0, 1
LEAD1.AnnToolbar.ButtonBitmapDown(LEAD1.AnnToolbar.ButtonCount) = LEAD1.Bitmap
LEAD1.Load "d:\ltwin14x\images\image1.cmp", 0, 0, 1
LEAD1.AnnToolbar.ButtonToolTipTextID(LEAD1.AnnToolbar.ButtonCount) = -1
LEAD1.AnnToolbar.ButtonToolTipText(LEAD1.AnnToolbar.ButtonCount) = "User defined tool"
LEAD1.AnnToolbar.ButtonCount = LEAD1.AnnToolbar.ButtonCount + 1
LEAD1.AnnToolbar.Visible = True
LEAD1.AnnUserMode = ANNUSERMODE_DESIGN
LEAD1.AnnToolbar.ButtonMenuTextID(13, 1) = -1
LEAD1.AnnToolbar.ButtonMenuText(13, 1) = "My text"
End Sub