📄 funcfilesave.frm
字号:
VERSION 5.00
Begin VB.Form FuncFileSave
BorderStyle = 5 'Sizable ToolWindow
Caption = "File Save As"
ClientHeight = 2805
ClientLeft = 60
ClientTop = 285
ClientWidth = 4860
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2805
ScaleWidth = 4860
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton CancelCmd
Caption = "Cancel"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2520
TabIndex = 5
Top = 2040
Width = 2055
End
Begin VB.CommandButton EnterCmd
Caption = "Enter"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2520
TabIndex = 4
Top = 1440
Width = 2055
End
Begin VB.TextBox FileName
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2520
TabIndex = 2
Top = 600
Width = 2175
End
Begin VB.FileListBox FileList
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2115
Hidden = -1 'True
Left = 120
Pattern = "*.ini"
TabIndex = 0
Top = 360
Width = 2055
End
Begin VB.Label Label2
Caption = "Enter the file name:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2520
TabIndex = 3
Top = 120
Width = 2295
End
Begin VB.Label Label1
Caption = "File:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 1
Top = 120
Width = 1215
End
End
Attribute VB_Name = "FuncFileSave"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub CancelCmd_Click()
Unload Me
End Sub
Private Sub EnterCmd_Click()
Dim TempFile As String
Dim TempPath As String
Dim i As Integer
Dim MyChar As String
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
TempPath = App.Path & "\FuncTest"
If LCase(right(Trim$(FileName.Text), 4)) = ".ini" Then
TempFile = Trim$(FileName.Text)
Else
TempFile = Trim$(FileName.Text) & ".ini"
End If
Open TempPath & "\" & TempFile For Output As #1
Print #1, "[count]"
Print #1, "count=" & (UBound(FuncTstAry) + 1)
Print #1, "[test trip]"
For i = 0 To UBound(FuncTstAry)
Print #1, i + 1 & "trip="; FuncTstAry(i)
If FuncTstAry(i) = "Message" Then
fso.copyfile App.Path & "\" & FuncTstKeyAry(i) & ".txt", App.Path & "\message\" & left$(TempFile, Len(TempFile) - 4) & FuncTstKeyAry(i) & ".txt"
Print #1, i + 1 & "Msg="; App.Path & "\message\" & left$(TempFile, Len(TempFile) - 4) & FuncTstKeyAry(i) & ".txt"
Kill App.Path & "\" & FuncTstKeyAry(i) & ".txt"
End If
Next i
Close #1
Unload Me
End Sub
Private Sub FileList_Click()
FileName.Text = Trim$(FileList.FileName)
End Sub
Private Sub Form_Load()
FileList.Path = App.Path & "\FuncTest"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -