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

📄 form03.frm

📁 给出了详细的vb环境下mo基本功能的代码 如图层的加载
💻 FRM
字号:
VERSION 5.00
Object = "{9BD6A640-CE75-11D1-AF04-204C4F4F5020}#2.0#0"; "mo20.ocx"
Begin VB.Form Form03 
   Caption         =   "moTrueTypeMarker演示"
   ClientHeight    =   5010
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6510
   LinkTopic       =   "Form2"
   ScaleHeight     =   5010
   ScaleWidth      =   6510
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command1 
      Caption         =   "画图"
      Height          =   495
      Left            =   2400
      TabIndex        =   1
      Top             =   4440
      Width           =   1215
   End
   Begin MapObjects2.Map Map1 
      Height          =   4215
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6375
      _Version        =   131072
      _ExtentX        =   11245
      _ExtentY        =   7435
      _StockProps     =   225
      BackColor       =   16777215
      BorderStyle     =   1
      Contents        =   "Form03.frx":0000
   End
End
Attribute VB_Name = "Form03"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Xuewei,2003/6/4
'moTrueTypeMarker演示

Option Explicit

Dim sym As New MapObjects2.Symbol
Dim Pt As MapObjects2.Point

Private Sub Command1_Click()
  Set Pt = Map1.ToMapPoint(2500, 1500)
  sym.CharacterIndex = 101
  Map1.TrackingLayer.Refresh True
End Sub

Private Sub Form_Load()
  With sym
    .SymbolType = moPointSymbol
    .Font = "ESRI Transportation & Municipal"
    .Size = 100
    .Style = moTrueTypeMarker
    .Color = moRed
  End With
End Sub

Private Sub Map1_AfterTrackingLayerDraw(ByVal hDC As stdole.OLE_HANDLE)
    If Not Pt Is Nothing Then
      Map1.DrawShape Pt, sym
    End If
End Sub

⌨️ 快捷键说明

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