Load and display vector data like ESRI Shape files or DGN, DXF files
Use the THBVector object to load your vector files. The LoadFromFile function will do this. After loading THBVector contains one or more layers populated with the loaded geometry objects.
Before loading you should set the styles to affect the visual appearance of the loaded geometry objects. You can change the style of all geometry objects later too.
After loading we plug the loaded vector data into the viewer control THBView.
' add the road data to the viewer
Dim vecRoads As New THBVector
' style of the roads
Set sty = vf.CreateTHBGeometryStyle("Roads"; _
vf.CreateTHBPenGeometryStyle(thbPS_SOLID, 0.1, RGB(0, 0, 255)), _
vf.CreateTHBBrushGeometryStyle(RGB(255, 255, 255)), _
vf.CreateTHBFontGeometryStyle1(15, "Arial"))
sty.ScaledStyle = True
vecRoads.DefaultStyles.LineStyle = sty
vecRoads.LoadFromFile GetApplicationDir + "..\..\Pics\NorthAmerica\Roads\road_l.shp", thbifAutoDetect
Set viewlay = vecRoads.InterfaceITHBViewLayer
viewlay.name = "Roads"
viewlay.MinZoomFactor = 5000
viewlay.MaxZoomFactor = 999999
THBView1.Layers.Add viewlay
' add the railroad data to the viewer
Dim vecRailRoad As New THBVector
' style of the railroad
vecRailRoad.DefaultStyles.LineStyle = vf.CreateTHBGeometryStyle("Lines", _
vf.CreateTHBPenGeometryStyle(thbPS_SOLID, 4, RGB(255, 80, 100)), _
vf.CreateTHBBrushGeometryStyle(RGB(255, 255, 255)), _
vf.CreateTHBFontGeometryStyle1(15, "Arial"))
vecRailRoad.LoadFromFile GetApplicationDir + "..\..\Pics\NorthAmerica\RailRoads\rail_l.shp", thbifAutoDetect
Set viewlay = vecRailRoad.InterfaceITHBViewLayer
viewlay.name = "Railroad"
viewlay.MinZoomFactor = 10000
viewlay.MaxZoomFactor = 999999
THBView1.Layers.Add viewlay



RSS News Feed