📄 main.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = " File encipher V1.1 Guilty Gear Mania Studio"
ClientHeight = 2235
ClientLeft = 4935
ClientTop = 4695
ClientWidth = 5400
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "main.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2235
ScaleWidth = 5400
Begin VB.CheckBox Check_canopen
Caption = "Open file when proccessing finished"
Height = 255
Left = 2160
TabIndex = 9
Top = 1440
Value = 1 'Checked
Width = 3135
End
Begin VB.CheckBox Check_candel
Caption = "Auto delete source file"
Height = 255
Left = 120
TabIndex = 8
Top = 1440
Value = 1 'Checked
Width = 1935
End
Begin VB.TextBox Text3
Appearance = 0 'Flat
BorderStyle = 0 'None
Height = 255
Left = 2040
TabIndex = 4
Top = 120
Width = 3255
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 375
Left = 1200
TabIndex = 6
Top = 1800
Visible = 0 'False
Width = 4095
_ExtentX = 7223
_ExtentY = 661
_Version = 393216
Appearance = 1
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 3720
Top = 600
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command3
Caption = "&Proccess"
Height = 375
Left = 120
TabIndex = 5
Top = 1800
Width = 975
End
Begin VB.TextBox Text2
Height = 375
Left = 1200
TabIndex = 3
Top = 960
Width = 4095
End
Begin VB.CommandButton Command2
Caption = "&Target"
Height = 375
Left = 120
TabIndex = 2
Top = 960
Width = 975
End
Begin VB.CommandButton Command1
Caption = "&Source"
Height = 375
Left = 120
TabIndex = 0
Top = 480
Width = 975
End
Begin VB.TextBox Text1
Height = 375
Left = 1200
TabIndex = 1
Top = 480
Width = 4095
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Enter password here:"
Height = 210
Left = 120
TabIndex = 7
Top = 120
Width = 1590
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim FixF As New FileIO
Dim iniFileN As String
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
Me.CommonDialog1.ShowOpen
Me.Text1.Text = Me.CommonDialog1.FileName
Me.Text2.Text = Me.CommonDialog1.FileName & ".pwd"
Me.Text3.SetFocus
End Sub
Private Sub Command2_Click()
Me.CommonDialog1.ShowSave
Me.Text2.Text = Me.CommonDialog1.FileName
End Sub
Private Sub Command3_Click()
With FixF
.SourceFile = Me.Text1.Text
.TargetFile = Me.Text2.Text
.FixFile
End With
If Me.Check_candel.Value = 1 Then
Kill Me.Text1.Text
End If
If Me.Check_canopen.Value = 1 Then
Call openFile(Me.Text2.Text)
End If
Me.Text1.Text = ""
Me.Text2.Text = ""
Me.Command1.SetFocus
End Sub
Private Sub Form_Load()
Dim X As Long
Dim value1 As Long
If Right(App.Path, 1) = "\" Then
iniFileN = App.Path & "fileio.ini"
Else
iniFileN = App.Path & "\fileio.ini"
End If
X = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3)
If Dir(iniFileN) = "" Then
Open iniFileN For Binary As #1
value1 = 1
Me.Check_candel.Value = value1
Me.Check_canopen.Value = value1
Put #1, , value1
Put #1, , value1
Close #1
MsgBox "Set config success"
Else
Open iniFileN For Binary As #1
Get #1, , value1
Me.Check_candel.Value = value1
Get #1, , value1
Me.Check_canopen.Value = value1
Close #1
End If
FixF.FilePrograssBar = Me.ProgressBar1
FixF.pswBox = Me.Text3
Me.CommonDialog1.Filter = "*.*|*.*"
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim msgX As Long
Dim value1 As Long
If Cancel = 0 Then
If FixF.IsProccess Then
msgX = MsgBox("Proccessing unfinished,Exit ?", vbOKCancel, "confirm exit")
If msgX = vbOK Then
Cancel = 0
Else
Cancel = 1
End If
End If
Open iniFileN For Binary As #1
value1 = Me.Check_candel.Value
Put #1, , value1
value1 = Me.Check_canopen.Value
Put #1, , value1
Close #1
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Me.Command3.SetFocus
End If
End Sub
Private Sub drawCircle(C_Start As Long, C_End As Long, C_Step As Single, C_fillColor As Long, ByRef Draw_Object As PictureBox)
Dim i As Long
Dim RX As Long, RY As Long
Dim Radius As Long
Select Case Draw_Object.ScaleHeight - Draw_Object.ScaleWidth
Case Is > 0
Radius = Int(Draw_Object.ScaleWidth / 2)
Case Else
Radius = Int(Draw_Object.ScaleHeight / 2)
End Select
Draw_Object.Cls
RX = Int(Draw_Object.ScaleWidth / 2)
RY = Int(Draw_Object.ScaleHeight / 2)
For i = C_Start To C_End Step C_Step
Draw_Object.Line (RX, RY)-(Radius * Cos(C_End) + RX, Radius * Sin(C_End) + RY), C_fillColor
Next i
End Sub
Private Function openFile(srcFile As String) As Long
On Error GoTo opfHandle
Dim rlt As Long
rlt = ShellExecute(Me.hwnd, "open", srcFile, "", "", 5)
openFile = rlt
Exit Function
opfHandle:
MsgBox Err & ":" & Error(Err), , "FileIO Error"
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -