📄 form04.frm
字号:
VERSION 5.00
Object = "{9BD6A640-CE75-11D1-AF04-204C4F4F5020}#2.0#0"; "mo20.ocx"
Begin VB.Form Form04
Caption = "墨西哥地图-放大、移动和缩小"
ClientHeight = 5190
ClientLeft = 60
ClientTop = 345
ClientWidth = 6540
LinkTopic = "Form1"
ScaleHeight = 5190
ScaleWidth = 6540
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "缩小"
Height = 495
Left = 2760
TabIndex = 0
Top = 4560
Width = 1215
End
Begin MapObjects2.Map Map1
Height = 4215
Left = 360
TabIndex = 1
Top = 120
Width = 5775
_Version = 131072
_ExtentX = 10186
_ExtentY = 7435
_StockProps = 225
BackColor = 16777215
BorderStyle = 1
Contents = "Form04.frx":0000
End
End
Attribute VB_Name = "Form04"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Xue Wei,2003/4/30
'实现按右键移动、左键放大;
'按“缩小”按钮缩小地图50%。
Option Explicit
Private Sub Command1_Click()
Dim p As MapObjects2.Point
Dim recs As MapObjects2.Recordset
Dim r As MapObjects2.Rectangle
Set r = Map1.Extent
r.ScaleRectangle 1.5
Map1.Extent = r
End Sub
Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Set Map1.Extent = Map1.TrackRectangle
ElseIf Button = vbRightButton Then
Map1.Pan
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -