0

hai i am working with vb6 with mapobjects2.4 and i wrote code for MaxFileBuffer Property and i also got the error message as ActiveX component cannot create object
th code is as like below:
Dim dc As New MapObjects2.DataConnection
Dim geo As New MapObjects2.GeoDataset
Dim layer As New MapObjects2.MapLayer

Private Sub setLabel()
If geo.AllowSharing Then
Label1.Caption = "MaxFileBuffer = " & Map1.MaxFileBuffer & " bytes"
Else
Label1.Caption = "File allows sharing"
End If
End Sub

Private Sub Form_Load()

dc.Database = "C:\Program Files\Esri\MapObjects2\Samples\Data\World"
Set geo = dc.FindGeoDataset("Country")

---> layer.GeoDataset = geo

Map1.Layers.Add layer

setLabel
End Sub

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by debasisdas
0

it seems like your application is somehow missing .ocx file when you are trying to compile the application. place the .ocx file to your windows system directory. to find the system directory of your os goto start->run then type this :-
%systemroot%\ if ur using windows xp then system32 is your target else system is ur target.

after placing the ocx goto start->run again and type the following command :-
regsvr32 <your ocx file name>

now open your project and add the activex control again from the project->components dialog. place that on ur form

now compile the prg. it should not be any problem now.

try and give feedback

regards
Shouvik

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.