📄 savefile.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form SaveFile
BorderStyle = 3 'Fixed Dialog
Caption = "存文件"
ClientHeight = 1368
ClientLeft = 36
ClientTop = 324
ClientWidth = 6000
Icon = "SaveFile.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1368
ScaleWidth = 6000
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox Picture1
BackColor = &H80000001&
Height = 1332
Left = 0
ScaleHeight = 1284
ScaleWidth = 5964
TabIndex = 0
Top = 0
Width = 6012
Begin MSComDlg.CommonDialog CommonDialog1
Left = 0
Top = 0
_ExtentX = 677
_ExtentY = 677
_Version = 393216
CancelError = -1 'True
End
Begin VB.CommandButton CommandSaveCancel
Caption = "放弃"
BeginProperty Font
Name = "宋体"
Size = 11.4
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3600
TabIndex = 5
Top = 720
Width = 1215
End
Begin VB.CommandButton CommandSaveFile
Caption = "..."
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 5280
TabIndex = 4
Top = 120
Width = 612
End
Begin VB.TextBox TextSaveFile
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 2
Top = 120
Width = 3855
End
Begin VB.CommandButton CommandSaveOK
Caption = "确定"
BeginProperty Font
Name = "宋体"
Size = 11.4
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 840
TabIndex = 1
Top = 720
Width = 1215
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H80000000&
Caption = "文件名"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 7
Left = 120
TabIndex = 3
Top = 120
Width = 1215
End
End
End
Attribute VB_Name = "SaveFile"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CommandSaveCancel_Click()
Unload Me
End Sub
Private Sub CommandSaveFile_Click()
Dim I As Integer, TheOutPath As String, TheOutFile As String
On Error Resume Next
TheOutFile = TextSaveFile.Text
I = InStrRev(TheOutFile, "\")
If (I > 0) Then
TheOutFile = Right(TheOutFile, Len(TheOutFile) - I)
End If
CommonDialog1.DialogTitle = "存放文件"
If (SaveFileCaption = "地震目录") Then
CommonDialog1.Filter = "*.WKF|*.WKF"
Else
CommonDialog1.Filter = "*.REG|*.REG"
End If
If (SaveFileCaption = "地震目录") Then
CommonDialog1.InitDir = ThePublicOutPath
Else
CommonDialog1.InitDir = TheRegionPath
End If
CommonDialog1.FileName = TheOutFile
CommonDialog1.FilterIndex = 0
CommonDialog1.ShowSave
If (Err = 0) Then '打开文件
I = InStr(CommonDialog1.FileName, CommonDialog1.FileTitle)
TheOutPath = Left(CommonDialog1.FileName, I - 1)
TheOutFile = UCase(CommonDialog1.FileTitle)
I = InStr(TheOutFile, ".")
If (I > 0) Then
TheOutFile = Left(TheOutFile, I)
End If
If (SaveFileCaption = "地震目录") Then
TheOutFile = TheOutFile + "WKF"
Else
TheOutFile = TheOutFile + "REG"
TheRegionPath = TheOutPath
End If
TextSaveFile.Text = TheOutPath + TheOutFile
End If
DoEvents
End Sub
Private Sub CommandSaveOK_Click()
Dim I As Integer
bSaveFile = True
TheSaveFile = TextSaveFile.Text
I = InStr(TheSaveFile, ".")
If (I > 0) Then
TheSaveFile = Left(TheSaveFile, I)
End If
If (SaveFileCaption = "地震目录") Then
TheSaveFile = TheSaveFile + "WKF"
Else
TheSaveFile = TheSaveFile + "REG"
End If
Unload Me
End Sub
Private Sub Form_Load()
bSaveFile = False
TextSaveFile.Text = TheSaveFile
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -