Сделал!!! кому интересно, вот код...
Private Sub Form_Load()
Dim pDoc As IDocument
Set pDoc = New MxDocument
Dim pApp As IApplication
Set pApp = pDoc.Parent
pApp.Visible = True
Dim pLayer As ILayer
Set pLayer = MakeLayer(pApp, "D:\DB.mdb", "Слой")
Dim pMxDoc As IMxDocument
Set pMxDoc = pDoc
pMxDoc.FocusMap.AddLayer pLayer
pMxDoc.ActiveView.Refresh
pMxDoc.UpdateContents
Dim pMap As IMap
Set pMap = pMxDoc.ActiveView.FocusMap
Dim pFeatLyr As IFeatureLayer
Dim i As Long
For i = 0 To pMap.LayerCount - 1
If TypeOf pMap.Layer(i) Is IFeatureLayer Then
Set pFeatLyr = pMap.Layer(i)
Exit For
End If
Next i
Dim pObjFact As IObjectFactory
Set pObjFact = pApp
Dim pColor As IRgbColor
Set pColor = New RgbColor
pColor.RGB = vbRed
Dim pMarkerSym As ICharacterMarkerSymbol
Set pMarkerSym = pObjFact.Create("esriDisplay.CharacterMarkerSymbol")
With pMarkerSym
.Size = 12
.Color = pColor
.Angle = 50
End With
Set pSym = pMarkerSym
Dim pSimpleRend As ISimpleRenderer
Set pSimpleRend = pObjFact.Create("esriCore.SimpleRenderer")
Set pSimpleRend.Symbol = pSym
Dim pGeoFL As IGeoFeatureLayer
Set pGeoFL = pFeatLyr
Set pGeoFL.Renderer = pSimpleRend
pMxDoc.ActiveView.Refresh
pMxDoc.UpdateContents
End Sub
Function MakeLayer(pObjFact As IObjectFactory, _
strWSDir As String, strFCName As String) As ILayer
Dim pPropset As IPropertySet
Set pPropset = New PropertySet
pPropset.SetProperty "DATABASE", strWSDir
'Открываем базу
Dim pWSF As IWorkspaceFactory
Set pWSF = pObjFact.Create("esricore.AccessWorkspaceFactory")
Dim pFWS As IFeatureWorkspace
Set pFWS = pWSF.Open(pPropset, 0)
Dim pFC As IFeatureClass
Set pFC = pFWS.OpenFeatureClass(strFCName)
Dim pFLayer As IFeatureLayer
Set pFLayer = pObjFact.Create("esriCore.FeatureLayer")
Set pFLayer.FeatureClass = pFC
pFLayer.Name = pFC.AliasName
Set MakeLayer = pFLayer
End Function
Только теперь еще одна проблема... Если меняю шрифт символа
Например:
Dim pFont As IFontDisp
Set pFont = New stdole.StdFont
pFont.Size = 24
pFont.Name = "Arial Black"
и пытаюсь изменить дефолтовый шрифт ArcMap'а...
With pMarkerSym
.Size = 12
.Color = pColor
.Font = pFont
.Angle = 50
End With
то в окне Display этот символ какой-то маленький, а в ActiveView-окне опять всё стирается...
Никто не подскажет в чем проблема?