⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form03b.frm

📁 一个关于基于MO编程的参考资料希望对大家的交流和学习有帮助
💻 FRM
字号:
VERSION 5.00
Object = "{9BD6A640-CE75-11D1-AF04-204C4F4F5020}#2.0#0"; "mo20.ocx"
Begin VB.Form Form03b 
   Caption         =   "moTrueTypeMarker演示"
   ClientHeight    =   5295
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7665
   LinkTopic       =   "Form2"
   ScaleHeight     =   5295
   ScaleWidth      =   7665
   StartUpPosition =   1  '所有者中心
   Begin MapObjects2.Map Map1 
      Height          =   5055
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   7335
      _Version        =   131072
      _ExtentX        =   12938
      _ExtentY        =   8916
      _StockProps     =   225
      BackColor       =   16777215
      BorderStyle     =   1
      Contents        =   "Form03b.frx":0000
   End
End
Attribute VB_Name = "Form03b"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Xuewei,2003/6/4
'moTrueTypeMarker演示,ESRI Transportation & Municipal;

Option Explicit
Dim Pt(400) As MapObjects2.Point
Dim Pt1(400) As MapObjects2.Point
Dim sym(400) As New MapObjects2.Symbol
Dim tSym As New MapObjects2.TextSymbol

Private Sub Form_Load()
  Dim i As Integer
  Dim Swidth As Integer
  Dim Sheight As Integer
  Dim fnt As New StdFont
  
  
  fnt.Name = "Wingdings"
'  Swidth = Screen.Width
'  Sheight = Screen.Height
  Swidth = 800 * 15
  Sheight = 600 * 15
  
  Me.Height = Sheight - 100
  Me.Width = Swidth - 300
  Map1.Height = Me.Height - 200
  Map1.Width = Me.Width - 200
  Map1.Top = 100
  Map1.Left = 100
    
  For i = 0 To 399
    With sym(i)
    .Style = moTrueTypeMarker
    .SymbolType = moPointSymbol
    '.Font = "ESRI Transportation & Municipal"
    .Font = fnt
    .Size = 20
    .Style = moTrueTypeMarker
    .Color = moBlack
    End With
  Next i
  tSym.Color = moBlack
  tSym.Font.Size = 10
End Sub

Private Sub Map1_AfterTrackingLayerDraw(ByVal hDC As stdole.OLE_HANDLE)
  Dim i As Integer
  For i = 0 To 399
    If Not Pt(i) Is Nothing Then
      Map1.DrawShape Pt(i), sym(i)
      Map1.DrawText 33 + i, Pt1(i), tSym
    End If
  Next i
End Sub

Private Sub Map1_Click()
  Dim i As Integer, j As Integer, k As Integer
  Const Mx0 = 400
  Const My0 = 300
  Const Mxc = 520
  Const Myc = 800
  
  k = 0
  j = 0
  For i = 0 To 199
  'For i = 200 To 399
    Set Pt(i) = Map1.ToMapPoint(j * Mxc + Mx0, My0 + k * Myc)
    Set Pt1(i) = Map1.ToMapPoint(j * Mxc + Mx0, My0 + 400 + k * Myc)
    sym(i).CharacterIndex = 33 + i
    j = j + 1
    If j >= 20 Then
      j = 0
      k = k + 1
    End If
  Next i
  Map1.TrackingLayer.Refresh True
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -