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

📄 form1.frm

📁 VB+OBJECT编写
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "Mscomctl.ocx"
Object = "{9BD6A640-CE75-11D1-AF04-204C4F4F5020}#2.0#0"; "Mo20.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{C7FC2F7C-0688-11D5-B2F8-000102D87123}#1.0#0"; "MO21Legend.ocx"
Begin VB.Form Form1 
   Caption         =   "地图加载和显示"
   ClientHeight    =   9120
   ClientLeft      =   810
   ClientTop       =   1200
   ClientWidth     =   13920
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   9120
   ScaleWidth      =   13920
   Begin VB.ComboBox Combo1 
      Height          =   315
      Left            =   2160
      TabIndex        =   14
      Top             =   8160
      Visible         =   0   'False
      Width           =   3495
   End
   Begin VB.ComboBox Combo2 
      Height          =   315
      Left            =   6000
      TabIndex        =   13
      Top             =   8160
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.ComboBox Combo3 
      Height          =   315
      Left            =   8280
      TabIndex        =   12
      Top             =   8160
      Visible         =   0   'False
      Width           =   3855
   End
   Begin VB.ListBox List1 
      Height          =   2400
      ItemData        =   "Form1.frx":0442
      Left            =   12240
      List            =   "Form1.frx":0444
      TabIndex        =   11
      Top             =   1080
      Width           =   1455
   End
   Begin VB.CommandButton Command7 
      Caption         =   "查询"
      Height          =   495
      Left            =   5400
      TabIndex        =   9
      Top             =   8520
      Width           =   1815
   End
   Begin VB.CommandButton Command4 
      Caption         =   "隐藏Map控件"
      Height          =   375
      Left            =   7344
      TabIndex        =   8
      Top             =   8040
      Width           =   1335
   End
   Begin VB.CommandButton Command3 
      Caption         =   "图层置顶"
      Height          =   375
      Left            =   5616
      TabIndex        =   7
      Top             =   8040
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "图层显示"
      Height          =   375
      Left            =   3888
      TabIndex        =   6
      Top             =   8040
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "隐藏图层"
      Height          =   375
      Left            =   2160
      TabIndex        =   5
      Top             =   8040
      Width           =   1335
   End
   Begin VB.CommandButton Command5 
      Caption         =   "图层卸载"
      Height          =   375
      Left            =   9072
      TabIndex        =   4
      Top             =   8040
      Width           =   1335
   End
   Begin VB.CommandButton Command6 
      Caption         =   "清除所有图层"
      Height          =   375
      Left            =   10800
      TabIndex        =   3
      Top             =   8040
      Width           =   1335
   End
   Begin MO21legend.legend legend1 
      Height          =   3495
      Left            =   240
      TabIndex        =   2
      Top             =   2640
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   6165
      BackColor       =   -2147483644
      ForeColor       =   -2147483630
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   7320
      Top             =   3960
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   7320
      Top             =   3960
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   4
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":0446
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":0558
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":066A
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":077C
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   630
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   13920
      _ExtentX        =   24553
      _ExtentY        =   1111
      ButtonWidth     =   820
      ButtonHeight    =   953
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   4
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "放大"
            ImageIndex      =   1
            Style           =   2
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "缩小"
            ImageIndex      =   2
            Style           =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "漫游"
            ImageIndex      =   3
            Style           =   2
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "全图"
            ImageIndex      =   4
            Style           =   2
         EndProperty
      EndProperty
   End
   Begin MapObjects2.Map Map1 
      Height          =   6975
      Left            =   2160
      TabIndex        =   0
      Top             =   840
      Width           =   9975
      _Version        =   131072
      _ExtentX        =   17595
      _ExtentY        =   12303
      _StockProps     =   225
      BackColor       =   16777215
      BorderStyle     =   1
      Contents        =   "Form1.frx":0BCE
   End
   Begin VB.Label Label1 
      Caption         =   "选择表达式:"
      Height          =   255
      Left            =   2160
      TabIndex        =   10
      Top             =   7920
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.Menu file 
      Caption         =   "文件&F"
      Begin VB.Menu load 
         Caption         =   "添加矢量数据"
      End
      Begin VB.Menu add 
         Caption         =   "添加栅格数据"
      End
      Begin VB.Menu o 
         Caption         =   "-"
      End
      Begin VB.Menu exit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu edit 
      Caption         =   "编辑&E"
      Begin VB.Menu zoomin 
         Caption         =   "放大"
      End
      Begin VB.Menu zoomout 
         Caption         =   "缩小"
      End
   End
   Begin VB.Menu about 
      Caption         =   "关于&A"
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim g_symSelection As MapObjects2.Symbol
Dim recSelection As MapObjects2.Recordset
Private Sub add_Click()
Dim imglyr As New MapObjects2.ImageLayer
Dim imgName As String
CommonDialog1.Filter = "JPEG数据(*.jpg)|*.jpg|BMP数据(*.bmp)|(*.bmp)|TIFF数据(*.tif)|(*.TIF)|GIF数据(*.gif)|(*.gif)|"
CommonDialog1.ShowOpen
imgName = CommonDialog1.FileName
If Len(CommonDialog1.FileName) = 0 Then Exit Sub
Map1.MousePointer = moHourglass
imglyr.file = imgName
Map1.Layers.add imglyr
Map1.MousePointer = moDefault
End Sub

Private Sub Combo1_Click()
  Call ListValues
End Sub
Private Sub Combo3_Click()
  Dim strExp As String
  If Combo3.Text = "<选择字段值>" Then
    MsgBox "请选择一个合适的字段值"
  End If
  If Map1.Layers(0).Records.Fields(Combo1.List(Combo1.ListIndex)).Type = moString Then
    strExp = Combo1.List(Combo1.ListIndex) & " " & Combo2.List(Combo2.ListIndex) & " '" & Combo3.Text & "'"
  Else
    strExp = Combo1.List(Combo1.ListIndex) & " " & Combo2.List(Combo2.ListIndex) & " " & Combo3.Text

⌨️ 快捷键说明

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