⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 文本文件的加密和解密程序,本人经过使用很实用.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4980
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6975
   LinkTopic       =   "Form1"
   ScaleHeight     =   4980
   ScaleWidth      =   6975
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   975
      Left            =   4440
      TabIndex        =   3
      Top             =   1560
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   735
      Left            =   840
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   600
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   1215
      Left            =   5760
      TabIndex        =   0
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Label Label4 
      Caption         =   "解密后的文本"
      Height          =   375
      Left            =   240
      TabIndex        =   6
      Top             =   3000
      Width           =   1215
   End
   Begin VB.Label Label3 
      Caption         =   "加密后的文本"
      Height          =   255
      Left            =   360
      TabIndex        =   5
      Top             =   2160
      Width           =   1095
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackColor       =   &H0000FF00&
      Caption         =   "Label2"
      Height          =   180
      Left            =   2400
      TabIndex        =   4
      Top             =   3120
      Width           =   1260
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   615
      Left            =   1800
      TabIndex        =   2
      Top             =   1920
      Width           =   1095
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit





Private Sub Command1_Click() '加密
Dim FielName As String
Dim Filelen As Long
Dim d As String


FielName = App.Path + "\ss.tmp"

Open FielName For Binary As #1   '
d = EDcode(Text1.Text, 123)
Put #1, , d
 
 'Open FielName For Output As #1   '此种方法是   打开清空后写入的内容覆盖原来的内容。
 d = EDcode(Text1.Text, 123)    '加密
 'Print #1, d

'Text1.Text = EDcode(Text1.Text, 123)

Text1.Text = d
Close #1
End Sub

Private Sub Command2_Click()

Dim FielName As String
Dim s As String


FielName = App.Path + "\ss.tmp"
Open FielName For Input As #1   '打开

Input #1, s     '读入一个数

Label1.Caption = s
s = EDcode(Trim(s), 123)  '解密
Label2.Caption = s
Close #1
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -