📄 formmain.frm
字号:
Map.Layers.Layer6.DoOverrideStyle= 0 'False
Map.Layers.Layer6.LabelProperties.LabelMax= 100
Map.Layers.Layer6.LabelProperties.Overlap= 0 'False
Map.Layers.Layer6.LabelProperties.Duplicate= -1 'True
Map.Layers.Layer6.LabelProperties.Offset= 2
Map.Layers.Layer6.LabelProperties.LineType= 0
Map.Layers.Layer6.LabelProperties.Zoom= 0 'False
Map.Layers.Layer6.LabelProperties.ZoomMin= 0
Map.Layers.Layer6.LabelProperties.ZoomMax= 10000
Map.Layers.Layer6.LabelProperties.Visible= -1 'True
Map.Layers.Layer6.LabelProperties.Position= 0
Map.Layers.Layer6.LabelProperties.Parallel= 0 'False
Map.Layers.Layer6.LabelProperties.LabelAlong= 0
Map.Layers.Layer6.LabelProperties.PartialSegments= 0 'False
Map.Layers.Layer6.LabelProperties.Style.TextFontBackColor= 16777215
Map.Layers.Layer6.LabelProperties.Style.SymbolChar= 0
BeginProperty Map.Layers.Layer6.LabelProperties.Style.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Map.Layers.Layer6.LabelProperties.Style.SymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Map.Layers.Layer6.LabelProperties.Style.LineStyle= 1
Map.Layers.Layer6.LabelProperties.Style.LineWidth= 1
Map.NumericCoordSys.ProjectionInfo= "FormMain.frx":0624
Map.DisplayCoordSys.ProjectionInfo= "FormMain.frx":0754
Map.Zoom = 4495
Map.CenterX = 103.437313
Map.CenterY = 35.464525
FeatureEditMode = 1
End
Begin ComctlLib.ImageList ImageList1
Left = 120
Top = 1680
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 25
ImageHeight = 22
MaskColor = 12632256
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 18
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":0884
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":0F5E
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":1628
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":1D4E
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":24C0
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":2C32
Key = ""
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":3404
Key = ""
EndProperty
BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":3BD6
Key = ""
EndProperty
BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":4258
Key = ""
EndProperty
BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":4932
Key = ""
EndProperty
BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":4FB4
Key = ""
EndProperty
BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":567E
Key = ""
EndProperty
BeginProperty ListImage13 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":5D58
Key = ""
EndProperty
BeginProperty ListImage14 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":64DA
Key = ""
EndProperty
BeginProperty ListImage15 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":6B68
Key = ""
EndProperty
BeginProperty ListImage16 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":71A2
Key = ""
EndProperty
BeginProperty ListImage17 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":78B4
Key = ""
EndProperty
BeginProperty ListImage18 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "FormMain.frx":7F7E
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu Openfile
Caption = "文件"
Begin VB.Menu NewTable
Caption = "新建表..."
Shortcut = ^N
End
Begin VB.Menu OpenTable
Caption = "打开表..."
Shortcut = ^O
End
Begin VB.Menu CloseTables
Caption = "关闭表..."
End
Begin VB.Menu CloseGeoset
Caption = "全部关闭"
End
Begin VB.Menu menu11
Caption = "-"
End
Begin VB.Menu mnuSaveTable
Caption = "保存表..."
Shortcut = ^S
End
Begin VB.Menu mnuSaveAs
Caption = "另存表为..."
End
Begin VB.Menu SaveGeoset
Caption = "保存地图集..."
End
Begin VB.Menu Exit
Caption = "退出"
End
End
Begin VB.Menu mnuEdit
Caption = "编辑"
Begin VB.Menu mnuEditUn
Caption = "撤消"
End
Begin VB.Menu mnuEditCut
Caption = "剪切"
End
Begin VB.Menu Copy
Caption = "拷贝"
Shortcut = ^C
End
Begin VB.Menu Paste
Caption = "粘贴"
Shortcut = ^V
End
Begin VB.Menu mnuEditDelete
Caption = "清除"
Shortcut = {DEL}
End
Begin VB.Menu mnuEditReShape
Caption = "整形"
End
End
Begin VB.Menu DataBind
Caption = "数据绑定"
Begin VB.Menu ADOType
Caption = "ADO类型"
End
End
Begin VB.Menu SelectOption
Caption = "查询"
Begin VB.Menu SqlQuery
Caption = "SQL查询"
End
Begin VB.Menu searchattibute
Caption = "图元到属性"
End
End
End
Attribute VB_Name = "FormMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const infotool = 120
Private Sub ADOType_Click()
Dim bindlayer As New bindlayer
Dim conn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
DirFile = Dir(App.Path + "\us_cust.TAB")
If (DirFile <> "") Then
Kill App.Path + "\us_cust.*"
End If
bindlayer.LayerName = "us_cust"
bindlayer.LayerType = miBindLayerTypeXY
bindlayer.RefColumn1 = "x"
bindlayer.RefColumn2 = "y"
conn.Open "dsn=mapst ats"
Set cmd.ActiveConnection = conn
cmd.CommandText = "select * from us_cust"
rs.CursorLocation = adUseClient
rs.Open cmd, , adOpenDynamic, adLockBatchOptimistic
FormMain.Map1.DataSets.Add miDataSetADO, rs, "us_cust", "company", , bindlayer
Call ChangeCombo
Set FormMain.Map1.Bounds = FormMain.Map1.Layers.Bounds
Set bindlayer = Nothing
Set conn = Nothing
Set cmd = Nothing
Set rs = Nothing
End Sub
Private Sub Copy_Click()
Dim lyr As MapXLib.Layer
For Each lyr In FormMain.Map1.Layers
If lyr.Selection.Count > 0 Then
Set CopyFtrs = lyr.NoFeatures
CopyFtrs.Add lyr.Selection.Clone
End If
Next
End Sub
Private Sub Exit_Click()
End
End Sub
Private Sub Form_Load()
FormMain.Map1.CreateCustomTool infotool, miToolTypePoint, miCrossCursor
End Sub
Private Sub LayerControl_Click()
FormMain.Map1.Layers.LayersDlg
End Sub
Private Sub mnuEditCut_Click()
Dim FtrFac As New MapXLib.FeatureFactory
Dim lyr As MapXLib.Layer, I As Integer
For Each lyr In FormMain.Map1.Layers
If lyr.Selection.Count > 0 Then
Set CopyFtrs = lyr.NoFeatures
CopyFtrs.Add lyr.Selection.Clone
End If
Next
For I = 1 To EditLayer.Selection.Count
'用于擦出的目标
Set Feature1 = EditLayer.Selection.Item(I)
EditLayer.DeleteFeature Feature1
Next I
Set Feature1 = Nothing
End Sub
Private Sub mnuEditDelete_Click()
Dim I As Integer
For I = 1 To EditLayer.Selection.Count
'用于擦出的目标
Set Feature1 = EditLayer.Selection.Item(I)
EditLayer.DeleteFeature Feature1
Next I
Set Feature1 = Nothing
If (BrowserLayer <> "") Then
FrmBrowser.Grid1.RemoveItem FrmBrowser.Grid1.Row
End If
End Sub
Private Sub mnuEditReShape_Click()
FormMain.Map1.Layers.Item(EditLayerName).ShowNodes = True
End Sub
Private Sub Paste_Click()
Dim lyr As MapXLib.Layer
Dim ftr As New MapXLib.Feature
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -