📄 frmproset.frm
字号:
VERSION 5.00
Object = "{DF3AE96F-29A3-44FD-A25E-7278248DBC33}#1.0#0"; "WinXPC_Engine.ocx"
Begin VB.Form frmProSet
BorderStyle = 3 'Fixed Dialog
Caption = "平面参考参数设置"
ClientHeight = 4485
ClientLeft = 5580
ClientTop = 3690
ClientWidth = 3870
Icon = "frmProSet.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4485
ScaleWidth = 3870
ShowInTaskbar = 0 'False
Begin VB.ComboBox cmbPrjname
Height = 315
ItemData = "frmProSet.frx":000C
Left = 1440
List = "frmProSet.frx":0016
Style = 2 'Dropdown List
TabIndex = 15
Top = 240
Width = 2295
End
Begin VB.Frame Frame2
Caption = "说明"
Height = 1095
Left = 120
TabIndex = 12
Top = 2880
Width = 3615
Begin VB.Label Label2
Caption = "Label2"
Height = 735
Left = 120
TabIndex = 13
Top = 240
Width = 3375
End
End
Begin WinXPC_Engine.WindowsXPC WindowsXPC1
Left = -3120
Top = 3600
_ExtentX = 6588
_ExtentY = 1085
ColorScheme = 2
Common_Dialog = 0 'False
PictureControl = 0 'False
FrameControl = 0 'False
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 330
Left = 2640
TabIndex = 7
Top = 4080
Width = 975
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Height = 330
Left = 1560
TabIndex = 6
Top = 4080
Width = 975
End
Begin VB.OptionButton optProToPro
Caption = "平面到平面转换"
Height = 375
Left = 2040
TabIndex = 9
Top = 840
Width = 1575
End
Begin VB.OptionButton optGeoToPro
Caption = "地理到平面转换"
Height = 375
Left = 240
TabIndex = 8
Top = 840
Value = -1 'True
Width = 1575
End
Begin VB.Frame Frame1
Height = 600
Left = 120
TabIndex = 10
Top = 720
Width = 1815
End
Begin VB.Frame frameGeo
Height = 1575
Left = 120
TabIndex = 0
Top = 1200
Width = 3630
Begin VB.PictureBox Picture1
BorderStyle = 0 'None
Height = 495
Left = 840
ScaleHeight = 495
ScaleWidth = 975
TabIndex = 11
Top = 960
Visible = 0 'False
Width = 975
End
Begin VB.CheckBox chkNO
Caption = "加带号"
Height = 375
Left = 2160
TabIndex = 4
Top = 960
Value = 1 'Checked
Width = 975
End
Begin VB.TextBox txtPrjNO
Height = 285
Left = 960
TabIndex = 3
Top = 1005
Width = 735
End
Begin VB.OptionButton opt3NO
Caption = "3度分带"
Height = 495
Left = 480
TabIndex = 2
Top = 360
Value = -1 'True
Width = 975
End
Begin VB.OptionButton opt6NO
Caption = "6度分带"
Height = 495
Left = 2160
TabIndex = 1
Top = 360
Width = 975
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "带号:"
Height = 195
Left = 360
TabIndex = 5
Top = 1050
Width = 540
End
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "目标平面坐标:"
Height = 195
Left = 120
TabIndex = 14
Top = 300
Width = 1260
End
End
Attribute VB_Name = "frmProSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'********************************************************************************
'文 件 名:frmProSet.frm
'描 述:平面坐标转换设置
'作 者:王来刚
'建立日期:2005年11月15日
'修 改 者:
'修改日期:
'修改内容:(简要说明修改的原因、内容,如改动很大,将改动前的源程序列在文件头注释中)
'修 改 者:
'修改日期:
'修改内容:
'*********************************************************************************
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
On Error GoTo err
g_PrjName = cmbPrjname.List(cmbPrjname.ListIndex) '得到选择的空间参考
'地理到平面转换设置
If optGeoToPro.Value = True Then
optType = "GeoToPro"
If opt3NO.Value = True Then '3度分带
g_NOInfo = 3
If IsNumeric(txtPrjNO.Text) Then
If CInt(txtPrjNO.Text) < 1 Or CInt(txtPrjNO.Text) > 60 Then '3度带的带号范围为1-60
MsgBox "请输入正确的整数带号(1-60)!", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
Else
MsgBox "请输入正确的整数带号(1-60)!", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
ElseIf opt6NO.Value = True Then '6度分带
g_NOInfo = 6
If IsNumeric(txtPrjNO.Text) Then
If CInt(txtPrjNO.Text) < 1 Or CInt(txtPrjNO.Text) > 30 Then '6度带的带号范围为1-30
MsgBox "请输入正确的整数带号(1-30)!", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
Else
MsgBox "请输入正确的整数带号(1-30)!", vbOKOnly + vbInformation, "提示"
Exit Sub
End If
End If
g_NO = txtPrjNO.Text '取得带号
If chkNO.Value = 0 Then
g_IsAddNO = "不" '不加带号
ElseIf chkNO.Value = 1 Then
g_IsAddNO = "" '加带号
End If
End If
'平面到平面转换设置
If optProToPro.Value = True Then
optType = "ProToPro"
If opt3NO.Value = True Then '3度带
g_NOInfo = 3
ElseIf opt6NO.Value = True Then '6度带
g_NOInfo = 6
End If
End If
Unload Me
Exit Sub
err:
MsgBox err.Description, vbOKOnly + vbInformation, "提示"
End Sub
Private Sub Form_Load()
On Error GoTo err
WindowsXPC1.FrameControl = False
WindowsXPC1.InitSubClassing
InitializeForm '初始化控件
'说明文件
Label2.Caption = " 地理参考到平面参考转换需要指定分带方式、带号以及是否加带号。平面参考到平面参考转换只需指定加不加带号。"
Exit Sub
err:
MsgBox err.Description, vbInformation + vbOKOnly, "系统"
End Sub
Private Sub Form_Unload(Cancel As Integer)
WindowsXPC1.EndWinXPCSubClassing
End Sub
Private Sub optGeoToPro_Click() '地理到平面
chkNO.Visible = True
Label1.Visible = True
Frame1.Left = 120
Picture1.Visible = False
End Sub
Private Sub optProToPro_Click() '平面到平面
chkNO.Visible = False
Label1.Visible = False
Frame1.Left = 1935
Picture1.Visible = True
End Sub
'*******************************************************
'函数名称:InitializeForm
'函数描述:初始化窗体时将上次设置的参数显示在窗体上
'参数说明:
'返回值:
'*******************************************************
Private Sub InitializeForm()
On Error Resume Next
If g_PrjName = "1954年北京经纬度平面" Then '初始下拉框
cmbPrjname.ListIndex = 0
Else
cmbPrjname.ListIndex = 1
End If
If g_NOInfo = 3 Then '3度分带
opt3NO.Value = True
ElseIf g_NOInfo = 6 Then '6度分带
opt6NO.Value = True
End If
If optType = "GeoToPro" Then
optGeoToPro = True
optProToPro = False
txtPrjNO.Text = g_NO
If g_IsAddNO = "不" Then
chkNO.Value = 0
End If
ElseIf optType = "ProToPro" Then
optProToPro = True
optGeoToPro = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -