I'm trying to use an ActiveX control called THBImage... having pretty good luck with it, but I'm getting stuck on the syntax of some stuff.
It's an image control that you drop on a form, and you can draw lines and circles, etc. Every time you draw a shape a "Region" is added to the control.
Whenever a shape is added to the image this event fires for the control
function newregion as v (Region as OLE::thbcom.thbimage.45::THBRegion)
:test:activex2.activex.RegionAdd(Region) 'this is my code for adding the new shape... THBRegion gets created here... or added to
end function
Whenever a shape is selected on the control, this event fires
function overregion as v (lngRegionIdSelected as N,x as N,y as N)
end function
The documention for creating a Region is:
The first way is to start a region placement operation by using the RegionStart methods. The user then places a Point, Line, LineString, Polygon or Rectangle region on the image. After completing the region the NewRegion event is fired providing you the THBRegion object. The new THBRegion object already has an Id value that you can use but if you prefer you can assign a different one.
I'm trying to get to the THBRegion object but can't see how.
In VB code you'd write
rg = THBImageLibCtl.THBRegion
but I'm not having any luck with it.
I'm not great with ActiveX syntax... anybody have an idea?
Thanks.
It's an image control that you drop on a form, and you can draw lines and circles, etc. Every time you draw a shape a "Region" is added to the control.
Whenever a shape is added to the image this event fires for the control
function newregion as v (Region as OLE::thbcom.thbimage.45::THBRegion)
:test:activex2.activex.RegionAdd(Region) 'this is my code for adding the new shape... THBRegion gets created here... or added to
end function
Whenever a shape is selected on the control, this event fires
function overregion as v (lngRegionIdSelected as N,x as N,y as N)
end function
The documention for creating a Region is:
The first way is to start a region placement operation by using the RegionStart methods. The user then places a Point, Line, LineString, Polygon or Rectangle region on the image. After completing the region the NewRegion event is fired providing you the THBRegion object. The new THBRegion object already has an Id value that you can use but if you prefer you can assign a different one.
I'm trying to get to the THBRegion object but can't see how.
In VB code you'd write
rg = THBImageLibCtl.THBRegion
but I'm not having any luck with it.
I'm not great with ActiveX syntax... anybody have an idea?
Thanks.
Comment