📄 frmhebei.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{9D6ED199-5910-11D2-98A6-00A0C9742CCA}#4.0#0"; "MAPX40.OCX"
Begin VB.Form 河北
AutoRedraw = -1 'True
Caption = "河北省"
ClientHeight = 9075
ClientLeft = 4290
ClientTop = 1965
ClientWidth = 11610
LinkTopic = "Form1"
Picture = "Frmhebei.frx":0000
ScaleHeight = 9075
ScaleWidth = 11610
Begin ComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
DragIcon = "Frmhebei.frx":6F75
Height = 420
Left = 0
TabIndex = 1
Top = 0
Width = 11610
_ExtentX = 20479
_ExtentY = 741
Appearance = 1
ImageList = "ImageList1"
_Version = 327682
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 10
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
EndProperty
EndProperty
End
Begin MapXLib.Map Map1
Height = 5775
Left = 4680
TabIndex = 0
Top = 720
Width = 5535
_Version = 400013
_ExtentX = 9763
_ExtentY = 10186
_StockProps = 1
GeoDictionary = "GeoDictionary"
GeoSet = "河北"
GeoSetUserName = "河北"
CurrentTool = 1000
Zoom = .153609
MaxSearchTime = 30
CenterX = 7.87406036293352E-04
CenteryY = -1.04136053667058E-03
Rotation = 0
FeatureEditMode = 1
NodeHandleSize = 0
TitleText = "河北"
DataSetGeoField = ""
AutoRedraw = -1 'True
PreferCompactLegends= 0 'False
TitleVisible = 0 'False
MousePointer = 0
MouseIcon = ""
MatchThreshold = 80
WaitCursorEnabled= -1 'True
MousewheelSupport= 1
MatchNumericFields= 0 'False
RedrawInterval = 10
PanAnimationLayer= 0 'False
InfotipSupport = -1 'True
InfotipPopupDelay= 500
DefaultConversionResolution= 12
ExportSelection = 0 'False
NumLayers = 1
Layer0.path = "河北名称.TAB"
Layer0.name = "河北名称"
Layer0.visible = -1 'True
Layer0.selectable= -1 'True
Layer0.editable = 0 'False
Layer0.shownodes= 0 'False
Layer0.showcentroids= 0 'False
Layer0.showlinedirection= 0 'False
Layer0.autolabel= -1 'True
Layer0.zoomlayering= 0 'False
Layer0.minzoom = 0
Layer0.maxzoom = 0
Layer0.DrawLabelsAfter= 0 'False
Layer0.styleoverride= 0 'False
Layer0.labelstyle.TextFontBackColor= 16777215
Layer0.labelstyle.SymbolChar= 0
BeginProperty Layer0.labelstyle.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "System"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Layer0.labelstyle.LineStyle= 1
Layer0.labelstyle.LineWidth= 1
Layer0.LabelMax = 100
Layer0.LabelOverlap= 0 'False
Layer0.LabelDuplicate= -1 'True
Layer0.LabelOffset= 2
Layer0.LabelLineType= 0
Layer0.LabelZoomMax= 10000
Layer0.LabelZoomMin= 0
Layer0.LabelZoom= 0 'False
Layer0.LabelVisible= -1 'True
Layer0.LabelOrientation= 0
Layer0.LabelParellel= -1 'True
Layer0.PartialSegments= 0 'False
TitleStyle.TextFontBackColor= 16777215
TitleStyle.TextFontOpaque= -1 'True
TitleStyle.SymbolChar= 0
BeginProperty TitleStyle.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 27.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty TitleStyle.SymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 21.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
DefaultStyle.TextFontBackColor= 16777215
DefaultStyle.SupportsBitmapSymbols= -1 'True
DefaultStyle.SymbolChar= 55
DefaultStyle.SymbolFontBackColor= 16777215
BeginProperty DefaultStyle.TextFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty DefaultStyle.SymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Map Symbols"
Size = 14.25
Charset = 2
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
DefaultStyle.LineStyle= 1
DefaultStyle.LineWidth= 1
DefaultStyle.RegionColor= 16777215
DefaultStyle.LinePattern= 2
DefaultStyle.RegionBackColor= 16777215
DefaultStyle.RegionBorderStyle= 1
DefaultStyle.RegionBorderWidth= 1
HasProjectionInfo= -1 'True
NumericCoordsys = "Frmhebei.frx":765F
DisplayCoordsys = "Frmhebei.frx":778F
NumDatasets = 0
TitleX = 5000
TitleY = 1000
TitleVisible = 0 'False
TitleEditable = -1 'True
TitlePostiion = 0
TitleBorder = -1 'True
End
Begin ComctlLib.ImageList ImageList1
Left = 960
Top = 1080
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 10
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":78BF
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":7A99
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":7C73
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":7E4D
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":8167
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":84B9
Key = ""
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":880B
Key = ""
EndProperty
BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":8B5D
Key = ""
EndProperty
BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":8D37
Key = ""
EndProperty
BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Frmhebei.frx":8F11
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu menu
Caption = "文件"
Begin VB.Menu menuquanguo
Caption = "全国土地"
End
Begin VB.Menu menuback
Caption = "返回首页"
End
End
End
Attribute VB_Name = "河北"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private FormOldWidth As Long
'保存窗体的原始宽度
Private FormOldHeight As Long
'保存窗体的原始高度
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long '窗体叉失效
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
'窗体叉失效
'首先,将Autoredrew设为true。之后写入一下代码:
Dim p As Picture
Private Sub Form_Resize()
Set Picture = Nothing
PaintPicture p, 0, 0, Width, Height
Debug.Print Width
Call ResizeForm(Me) '确保窗体改变时控件随之改变
Set Picture = Nothing '地图随窗体变化
PaintPicture p, 0, 0, Width, Height '地图随窗体变化
Debug.Print Width '地图随窗体变化
Map1.Move Map1.Left, Map1.Top, ScaleWidth - Map1.Left, ScaleHeight - Map1.Top '地图随窗体变化
Call ResizeForm(Me) '确保窗体改变时控件随之改变
'当窗体大小改变时,改变Map1和TreeView1控件的大小,
'使这两个控件始终添满整个窗体
Map1.Move Map1.Left, Map1.Top, ScaleWidth - Map1.Left, ScaleHeight - Map1.Top '地图随窗体变化
Map1.Move Map1.Left, Map1.Top, ScaleWidth - Map1.Left, ScaleHeight - Map1.Top '地图随窗体变化
End Sub
Private Sub Form_Load()
Set p = LoadPicture("D:\何二佳毕业设计\图片\Blue hills.jpg") '写上你自己的图片"
Picture = p
Dim R As Integer '窗体叉失效
Dim mymenu
mymenu = GetSystemMenu(Me.hwnd, 0)
RemoveMenu mymenu, &HF060, R '窗体叉失效
Call ResizeInit(Me) '在程序装入时必须加入
End Sub
Public Sub ResizeForm(河北 As Form)
Dim Pos(4) As Double
Dim i As Long, TempPos As Long, StartPos As Long
Dim Obj As Control
Dim ScaleX As Double, ScaleY As Double
ScaleX = 河北.ScaleWidth / FormOldWidth
'保存窗体宽度缩放比例
ScaleY = 河北.ScaleHeight / FormOldHeight
'保存窗体高度缩放比例
On Error Resume Next
For Each Obj In 河北
StartPos = 1
For i = 0 To 4
'读取控件的原始位置与大小
TempPos = InStr(StartPos, Obj.Tag, "", vbTextCompare)
If TempPos > 0 Then
Pos(i) = Mid(Obj.Tag, StartPos, TempPos - StartPos)
StartPos = TempPos + 1
Else
Pos(i) = 0
End If
'根据控件的原始位置及窗体改变大小
'的比例对控件重新定位与改变大小
Obj.MovePos (0) * ScaleX, Pos(1) * ScaleY, Pos(2) * ScaleX, Pos(3) * ScaleY
Next i
Next Obj
On Error GoTo 0
End Sub
Public Sub ResizeInit(河北 As Form)
Dim Obj As Control
FormOldWidth = 河北.ScaleWidth
FormOldHeight = 河北.ScaleHeight
On Error Resume Next
For Each Obj In 河北
Obj.Tag = Obj.Left & "" & Obj.Top & "" & Obj.Width & "" & Obj.Height & ""
Next Obj
On Error GoTo 0
End Sub
Private Sub menuback_Click()
Unload Me
Frmlogin.Show
End Sub
Private Sub menuquanguo_Click()
Unload Me
Frmmain.Show
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
Select Case Button.Index
Case 1
Map1.CurrentTool = miZoomInTool
Case 2
Map1.CurrentTool = miZoomOutTool
Case 3
Map1.CurrentTool = miPanTool
Case 4
Map1.CurrentTool = miArrowTool
Case 5
Map1.CurrentTool = miRectSelectTool
Case 6
Map1.CurrentTool = miPolygonSelectTool
Case 7
Map1.CurrentTool = miRectSelectTool
Case 8
Map1.CurrentTool = miSelectTool
Case 9
Map1.CurrentTool = miCenterTool
Case 10
Map1.Bounds = Map1.Layers.Bounds
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -