在AO+VC中怎样使通过属性查找到的图元结果在地图上不断的闪烁

你先找到 feature的geometry ,然后闪烁,可以参照下面的函数
 
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Public Sub FlashGeometry(pGeo As IGeometry, pMap As IMap, Optional iInterval As Integer = 300)
  'iInterval is in milliseconds
  
  Dim pSimpleLineSymbol As ILineSymbol, pSimpleFillSymbol As ISimpleFillSymbol
  Dim pSimpleMarkersymbol As ISimpleMarkerSymbol, pActive As IActiveView
  Dim pSymbol As ISymbol, pDisplay As IScreenDisplay, pColor As IRgbColor

  Set pColor = New RgbColor
  pColor.Red = 50
  pColor.Blue = 175
  pColor.Green = 50
  Set pActive = pMap
  Set pDisplay = pActive.ScreenDisplay
  
  pDisplay.StartDrawing 0, esriNoScreenCache
  
  Select Case pGeo.GeometryType
    Case esriGeometryPolyline
      Set pSimpleLineSymbol = New SimpleLineSymbol
      Set pSymbol = pSimpleLineSymbol  'QI
      pSymbol.ROP2 = esriROPNotXOrPen  'erase itself when drawn twice
      pSimpleLineSymbol.Width = 4
      pSimpleLineSymbol.Color = pColor
      pDisplay.SetSymbol pSimpleLineSymbol
      pDisplay.DrawPolyline pGeo
      Sleep iInterval
      pDisplay.DrawPolyline pGeo
    Case esriGeometryPolygon
      Set pSimpleFillSymbol = New SimpleFillSymbol
      Set pSymbol = pSimpleFillSymbol
      pSymbol.ROP2 = esriROPNotXOrPen
      pSimpleFillSymbol.Color = pColor
      pDisplay.SetSymbol pSimpleFillSymbol
      pDisplay.DrawPolygon pGeo
      Sleep iInterval
      pDisplay.DrawPolygon pGeo
    Case esriGeometryPoint
      Set pSimpleMarkersymbol = New SimpleMarkerSymbol
      Set pSymbol = pSimpleMarkersymbol
      pSymbol.ROP2 = esriROPNotXOrPen
      pSimpleMarkersymbol.Color = pColor
      pSimpleMarkersymbol.Size = 12
      pDisplay.SetSymbol pSimpleMarkersymbol
      pDisplay.DrawPoint pGeo
      Sleep iInterval
      pDisplay.DrawPoint pGeo
    Case esriGeometryMultipoint
      Set pSimpleMarkersymbol = New SimpleMarkerSymbol
      Set pSymbol = pSimpleMarkersymbol
      pSymbol.ROP2 = esriROPNotXOrPen
      pSimpleMarkersymbol.Color = pColor
      pSimpleMarkersymbol.Size = 12
      pDisplay.SetSymbol pSimpleMarkersymbol
      pDisplay.DrawMultipoint pGeo
      Sleep iInterval
      pDisplay.DrawMultipoint pGeo
    Case Else    ' Other type
  End Select
  
  pDisplay.FinishDrawing
End Sub
 

你可能感兴趣的:(Integer)