📄 form07.frm
字号:
VERSION 5.00
Object = "{9BD6A640-CE75-11D1-AF04-204C4F4F5020}#2.0#0"; "mo20.ocx"
Begin VB.Form Form07
Caption = "演示"
ClientHeight = 4080
ClientLeft = 60
ClientTop = 345
ClientWidth = 5310
LinkTopic = "Form1"
ScaleHeight = 4080
ScaleWidth = 5310
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "显示"
Height = 495
Left = 1920
TabIndex = 1
Top = 3480
Width = 1335
End
Begin MapObjects2.Map Map1
Height = 3255
Left = 0
TabIndex = 0
Top = 0
Width = 5295
_Version = 131072
_ExtentX = 9340
_ExtentY = 5741
_StockProps = 225
BackColor = 16777215
BorderStyle = 1
Contents = "form07.frx":0000
End
End
Attribute VB_Name = "Form07"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Xuewei,2003/5/7
'在图上画矩形。
Option Explicit
Dim Rect As MapObjects2.Rectangle
Private Sub Command1_Click()
Dim Dist As Double
Dim Pt As New MapObjects2.Point
Set Rect = New MapObjects2.Rectangle
Dist = 0.2
Set Pt = Map1.ToMapPoint(2500, 1500)
Rect.Right = Pt.X + Dist
Rect.Left = Pt.X - Dist
Rect.Top = Pt.Y + Dist
Rect.Bottom = Pt.Y - Dist
Map1.Refresh
End Sub
Private Sub Map1_AfterTrackingLayerDraw(ByVal hDC As stdole.OLE_HANDLE)
If Not Rect Is Nothing Then
Dim sym As New Symbol
sym.SymbolType = moFillSymbol
sym.Style = 1
sym.Size = 3
sym.Color = moBlue
Map1.DrawShape Rect, sym
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -