gis1117
  • 注册日期
  • 发帖数
  • QQ
  • 铜币
  • 威望
  • 贡献值
  • 银元
阅读:1108回复:0

mo中使用truetype符号的例子

楼主#
更多 发布于:2003-12-11 15:27
新建立工程,拷贝代码进去,加上map1,运行

Option Explicit

Private Sub Form_Load()
  Dim fnt As New StdFont
  fnt.Name = "Wingdings" 'TrueType font
  Map1.TrackingLayer.SymbolCount = 1

  With Map1.TrackingLayer.Symbol(0)
    .Font = fnt
    .Size = 18
    .Style = moTrueTypeMarker
    .Color = moBlack
  End With
End Sub

Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  Static chridx
  With Map1.TrackingLayer
    If .EventCount > 0 Then .RemoveEvent 0
  End With

  
  If chridx = 0 Then chridx = 33
  
  With Map1.Extent.Center
    Dim pt As MapObjects2.Point
    Set pt = Map1.ToMapPoint(x, y)
    Map1.TrackingLayer.AddEvent pt, 0
  End With

  Map1.TrackingLayer.Symbol(0).CharacterIndex = chridx
  
  chridx = chridx + 1
  
End Sub



喜欢0 评分0
游客

返回顶部