engine给的接口只能闪一个的
只能采用下面的方法了,自己画.
Private Sub UIButtonControl1_Click()
Dim pDoc As IMxDocument
Set pDoc = ThisDocument
Dim pMap As IMap
Set pMap = pDoc.FocusMap
Dim pFL As IFeatureLayer
Set pFL = pMap.Layer(0)
Dim pFCursor As IFeatureCursor
Set pFCursor = pFL.Search(Nothing, False)
Dim pPointCollection As IPointCollection
Set pPointCollection = New Multipoint
Dim pF As IFeature
Set pF = pFCursor.NextFeature
Do While Not pF Is Nothing
pPointCollection.AddPoint pF.Shape
Set pF = pFCursor.NextFeature
Loop
FlashGeometry pPointCollection
End Sub
' effet visuel
'flash sur un objet
'en entree : la geometry de l'objet (pFeatrue.Shape)
'en sortie :
Public Sub FlashGeometry(pGeo As esriCore.IGeometry)
Dim pDisplay As IScreenDisplay
Dim Cache As Integer
Dim pCartographicLineSymbol As ICartographicLineSymbol
Dim pSimpleFillSymbol As ISimpleFillSymbol
Dim pSimpleMarkersymbol As ISimpleMarkerSymbol
Dim pLineDecoration As ILineDecoration
Dim pLineProperties As ILineProperties
Dim pLineDecElement As ISimpleLineDecorationElement
Dim pAMSymbol As IArrowMarkerSymbol
Dim pSymbol As ISymbol
Dim pColor As IRgbColor
Dim Interval As Long
Dim Size As Long
Dim pApp As IMxApplication
Set pApp = Application
Set pDisplay = pApp.Display
'Set pDisplay = m_pEditor.Display
Set pColor = New RgbColor
pColor.Green = 150
Interval = 500
Size = 9
Cache = pDisplay.ActiveCache 'Original Cache
pDisplay.ActiveCache = esriNoScreenCache
pDisplay.StartDrawing pDisplay.hDC, esriNoScreenCache
Select Case pGeo.GeometryType
Case esriGeometryPolyline
Set pAMSymbol = New ArrowMarkerSymbol
pAMSymbol.Style = esriAMSPlain
pAMSymbol.Size = 12
pAMSymbol.Color = pColor
Set pLineProperties = pCartographicLineSymbol 'QI
Set pLineDecElement = New SimpleLineDecorationElement
pLineDecElement.Rotate = True
pLineDecElement.MarkerSymbol = pAMSymbol
pLineDecElement.AddPosition (1)
Set pLineDecoration = New LineDecoration
pLineDecoration.AddElement pLineDecElement
Set pCartographicLineSymbol = New CartographicLineSymbol
Set pSymbol = pCartographicLineSymbol 'QI
pSymbol.ROP2 = esriROPNotXOrPen 'erase itself when drawn twice
pCartographicLineSymbol.Width = Size
pCartographicLineSymbol.Color = pColor
pDisplay.SetSymbol pSymbol
pDisplay.DrawPolyline pGeo
pLineDecoration.Draw pDisplay.hDC, pDisplay.DisplayTransformation, pGeo
Sleep Interval
pDisplay.DrawPolyline pGeo
pLineDecoration.Draw pDisplay.hDC, pDisplay.DisplayTransformation, pGeo
Case esriGeometryPolygon
Set pSimpleFillSymbol = New SimpleFillSymbol
Set pSymbol = pSimpleFillSymbol
pSymbol.ROP2 = esriROPNotXOrPen
pSimpleFillSymbol.Color = pColor
pDisplay.SetSymbol pSimpleFillSymbol
pDisplay.DrawPolygon pGeo
Sleep Interval
pDisplay.DrawPolygon pGeo
Case esriGeometryPoint
Set pSimpleMarkersymbol = New SimpleMarkerSymbol
Set pSymbol = pSimpleMarkersymbol
pSymbol.ROP2 = esriROPNotXOrPen
pSimpleMarkersymbol.Color = pColor
pSimpleMarkersymbol.Size = Size
pDisplay.SetSymbol pSimpleMarkersymbol
pDisplay.DrawPoint pGeo
Sleep Interval
pDisplay.DrawPoint pGeo
Case esriGeometryMultipoint
Set pSimpleMarkersymbol = New SimpleMarkerSymbol
Set pSymbol = pSimpleMarkersymbol
pSymbol.ROP2 = esriROPNotXOrPen
pSimpleMarkersymbol.Color = pColor
pSimpleMarkersymbol.Size = Size
pDisplay.SetSymbol pSimpleMarkersymbol
pDisplay.DrawMultipoint pGeo
Sleep Interval
pDisplay.DrawMultipoint pGeo
Case Else ' Other type
End Select
pDisplay.FinishDrawing
'reset the cache
pDisplay.ActiveCache = Cache
End Sub