?? frmpackoption.frm
字號:
VERSION 5.00
Begin VB.Form frmPackOption
BorderStyle = 3 'Fixed Dialog
Caption = "緊縮表選項"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdCancel
Caption = "退出"
Height = 400
Left = 2640
TabIndex = 5
Top = 2400
Width = 1200
End
Begin VB.CommandButton cmdPack
Caption = "緊縮表"
Height = 400
Left = 720
TabIndex = 4
Top = 2400
Width = 1200
End
Begin VB.ListBox lstPackOption
Height = 1035
ItemData = "frmPackOption.frx":0000
Left = 1560
List = "frmPackOption.frx":001C
MultiSelect = 2 'Extended
TabIndex = 3
Top = 960
Width = 2775
End
Begin VB.ComboBox cbPackLayers
Height = 315
Left = 1560
TabIndex = 1
Top = 240
Width = 2775
End
Begin VB.Label Label2
Caption = "選項:"
Height = 255
Left = 240
TabIndex = 2
Top = 1000
Width = 1095
End
Begin VB.Label Label1
Caption = "可緊縮的表:"
Height = 255
Left = 240
TabIndex = 0
Top = 270
Width = 1215
End
End
Attribute VB_Name = "frmPackOption"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'********************************************************************************
'File Name :frmPackOption.frm
'Description :set packing parameter and packing a layer
'Author :James Liu
'Copyright :MapInfo China
'Create Date :2002年9月11日
'********************************************************************************
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdPack_Click()
Dim oLayer As MapXLib.Layer
Dim iPackOption As Integer
Dim i As Integer
On Error Resume Next
If lstPackOption.SelCount = 0 Then
MsgBox "請選擇表緊縮參數。"
Exit Sub
End If
iPackOption = 0
For i = 0 To lstPackOption.ListCount - 1
If lstPackOption.Selected(i) Then
iPackOption = iPackOption + lstPackOption.ItemData(i)
End If
Next i
Set oLayer = frmMain.Map.Layers(Trim(cbPackLayers.Text))
If oLayer.SupportsPack(iPackOption) = False Then
MsgBox "選擇圖層不支持指定緊縮操作!"
Exit Sub
End If
If MsgBox("緊縮表可能需要較長時間,請耐心等待!", vbOKCancel, "緊縮表") = vbOK Then
Screen.MousePointer = vbHourglass
oLayer.Pack iPackOption
MsgBox "完成對" & cbPackLayers.Text & "的緊縮操作!"
Screen.MousePointer = vbDefault
End If
End Sub
Private Sub Form_Load()
Dim oLayer As MapXLib.Layer
For Each oLayer In frmMain.Map.Layers
' If oLayer.SupportsPack() Then
cbPackLayers.AddItem oLayer.Name
' End If
Next oLayer
If cbPackLayers.ListCount > 0 Then
cbPackLayers.ListIndex = 0
cmdPack.Enabled = True
Else
cmdPack.Enabled = False
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -