|
In
order to create Ann objects, the Main OCX must have an image (Bitmap property
not zero), and a container object (AnnContainer) must be created in it.
Here is
a simple Visual Basic code that works from scratch (no previous image or
objects created):
Dim
hObjAnRect As Long
LEAD1.CreateBitmap
800, 600, 24
LEAD1.Fill
RGB(255, 62, 191)
hObjAnRect
= LEAD1.AnnCreate(ANNOBJECT_LINE, True, True)
LEAD1.AnnDefine
hObjAnRect, 60, 70, ANNDEFINE_BEGINSET
LEAD1.AnnDefine
hObjAnRect, 180, 180, ANNDEFINE_END
LEAD1.AnnUserMode
= ANNUSERMODE_RUN
LEAD1.AnnSetForeColor hObjAnRect, RGB(20, 90, 20),
False
Qasem Al-Lubani LEAD Technical Support www.leadtools.com
|