📄 key enc dec.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Key Encrypt Decrypt"
ClientHeight = 1215
ClientLeft = 60
ClientTop = 345
ClientWidth = 4605
Icon = "Key Enc Dec.frx":0000
LinkTopic = "Form1"
ScaleHeight = 1215
ScaleWidth = 4605
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command3
Caption = "&Encrypt"
Height = 495
Left = 1680
TabIndex = 3
Top = 600
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "E&xit"
Height = 495
Left = 120
TabIndex = 2
Top = 600
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "&Decrypt"
Height = 495
Left = 3240
TabIndex = 1
Top = 600
Width = 1215
End
Begin VB.TextBox Text1
Height = 375
Left = 120
TabIndex = 0
Top = 120
Width = 4335
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Function Encrypt(ByVal Plain As String)
Dim Letter As String
For I = 1 To Len(Plain)
Letter = Mid$(Plain, I, 1)
Mid$(Plain, I, 1) = Chr(Asc(Letter) + 1)
Next I
Encrypt = Plain
End Function
Public Function Decrypt(ByVal Encrypted As String)
Dim Letter As String
For I = 1 To Len(Encrypted)
Letter = Mid$(Encrypted, I, 1)
Mid$(Encrypted, I, 1) = Chr(Asc(Letter) - 1)
Next I
Decrypt = Encrypted
End Function
Private Sub Command1_Click()
Text1 = Decrypt(Text1)
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Text1 = Encrypt(Text1)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -