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

📄 frmoptions.frm

📁 民用加密解密系统是用VB6.0完全开发的中文简体繁体通用的符号加密系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
Private Sub Label10_Click()
Dim i
Dim templab
templab = Label7(0).Caption
For i = 0 To 8 Step 1
Label7(i).Caption = Label7(i + 1).Caption
Next
Label7(9).Caption = templab
Dim bai, shi, ge

ge = Int(Val(Text10.Text) Mod 100 Mod 10)
ge = Val(Label7(0).Caption)
Text10.Text = Mid$(Trim(Text10.Text), 1, 2) + Trim(ge)
jishu3 = jishu3 + 1
If (jishu3 Mod 2) = 0 Then
Label10.BackColor = vbGreen
Label10.ForeColor = vbBlack
Else
Label10.BackColor = vbYellow
Label10.ForeColor = vbRed
End If
End Sub

Private Sub Label8_Click()
Dim i

Dim templab
templab = Label5(0).Caption
For i = 0 To 8 Step 1
Label5(i).Caption = Label5(i + 1).Caption
Next
Label5(9).Caption = templab
Dim bai, shi, ge
bai = Int(Val(Text10.Text) / 100)
bai = Val(Label5(0).Caption)
Text10.Text = Trim(bai) + Mid$(Text10.Text, 2, 2)


jishu1 = jishu1 + 1
If (jishu1 Mod 2) = 0 Then
Label8.BackColor = vbGreen
Label8.ForeColor = vbBlack
Else
Label8.BackColor = vbYellow
Label8.ForeColor = vbRed
End If

End Sub

Private Sub Label9_Click()
Dim i
Dim templab
templab = Label6(0).Caption
For i = 0 To 8 Step 1
Label6(i).Caption = Label6(i + 1).Caption
Next
Label6(9).Caption = templab
Dim bai, shi, ge
shi = Int(Val(Text10.Text) / 100 / 10)
shi = Val(Label6(0).Caption)
Text10.Text = Mid$(Text10.Text, 1, 1) + Trim(shi) + Mid$(Text10.Text, 3, 1)
jishu2 = jishu2 + 1
If (jishu2 Mod 2) = 0 Then
Label9.BackColor = vbGreen
Label9.ForeColor = vbBlack
Else
Label9.BackColor = vbYellow
Label9.ForeColor = vbRed
End If
End Sub

Private Sub open_Click()
Dim inputdata
CommonDialog1.Action = 1
Text2.Text = ""
If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do While Not EOF(1)
  Line Input #1, inputdata
  Text2.Text = Text2.Text + inputdata + vbNewLine
Loop
Close #1
End If
End Sub

Private Sub opencode_Click()
Dim inputdata
CommonDialog1.Action = 1
Text4.Text = ""
If CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do While Not EOF(1)
  Line Input #1, inputdata
  Text4.Text = Text4.Text + inputdata + vbNewLine
Loop
Close #1
End If
End Sub

Private Sub Picture1_Click()
Dim i
Dim templab
templab = Label5(0).Caption
For i = 0 To 8 Step 1
Label5(i).Caption = Label5(i + 1).Caption
Next
Label5(9).Caption = templab
Dim bai, shi, ge
bai = Int(Val(Text10.Text) / 100)
shi = Int(Val(Text10.Text) / 100 / 10)
ge = Int(Val(Text10.Text) Mod 100 Mod 10)
bai = Val(Label5(0).Caption)
Text10.Text = Trim(bai) + Trim(shi)
Text10.Text = Text10.Text + Trim(ge)

End Sub

Private Sub Picture2_Click()
Dim i
Dim templab
templab = Label6(0).Caption
For i = 0 To 8 Step 1
Label6(i).Caption = Label6(i + 1).Caption
Next
Label6(9).Caption = templab
Dim bai, shi, ge
bai = Int(Val(Text10.Text) / 100)
shi = Int(Val(Text10.Text) / 100 / 10)
ge = Int(Val(Text10.Text) Mod 100 Mod 10)
shi = Val(Label6(0).Caption)
Text10.Text = Trim(bai) + Trim(shi)
Text10.Text = Text10.Text + Trim(ge)

End Sub

Private Sub Picture3_Click()
Dim i
Dim templab
templab = Label7(0).Caption
For i = 0 To 8 Step 1
Label7(i).Caption = Label7(i + 1).Caption
Next
Label7(9).Caption = templab
Dim bai, shi, ge

ge = Int(Val(Text10.Text) Mod 100 Mod 10)
ge = Val(Label7(0).Caption)
Text10.Text = Mid$(Trim(Text10.Text), 1, 2) + Trim(ge)

End Sub

Private Sub qingkong_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text5.Text = ""
Text4.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End Sub

Private Sub save_Click()
Dim fso, file
Me.CommonDialog1.Filter = "*.txt|*.txt"
Me.CommonDialog1.ShowSave
If CommonDialog1.FileName <> "" Then
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.CreateTextFile(CommonDialog1.FileName, True)
file.write Text5.Text
file.Close
End If
End Sub

Private Sub saveencode_Click()
Dim fso, file
Me.CommonDialog1.Filter = "*.txt|*.txt"
Me.CommonDialog1.ShowSave
If CommonDialog1.FileName <> "" Then
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.CreateTextFile(CommonDialog1.FileName, True)
file.write Text6.Text
file.Close
End If
End Sub

Private Sub tbsOptions_Click()
    
    Dim i As Integer
    'show and enable the selected tab's controls
    'and hide and disable all others
    For i = 0 To tbsOptions.Tabs.Count - 1
        If i = tbsOptions.SelectedItem.Index - 1 Then
            picOptions(i).Left = 480
            picOptions(i).Top = 600
            picOptions(i).Enabled = True
        Else
            picOptions(i).Left = -20000
            picOptions(i).Enabled = False
        End If
    Next
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
    Text8.Text = ""
End Sub

Private Sub Text2_Change()
Dim Str As String
Dim intQu As Integer
Dim intWei As Integer
Dim tempstr
Dim tempnum
Dim num
Dim hanzinum As Integer
Dim zimunum As Integer
Dim qitanum As Integer
Dim f
Dim strnum
Dim L1, R1 As Integer
Dim InputStr As String
Dim i
If Text2.Text = "" Then
Text1.Text = ""
Text3.Text = ""

Text5.Text = ""
End If
Text1.Text = ""
Text5.Text = ""
zimunum = 0
qitanum = 0
num = Len(Text2.Text)

'**************************开始找当前字符***************************************

For i = 1 To num Step 1

If Text2.Text <> "" Then
InputStr = Text2.Text
InputStr = Mid$(InputStr, i, 1)

'**************************如果是英文和数字则执行IF(4)开始**********

If Asc(InputStr) >= 32 And Asc(InputStr) <= 128 Then
Dim x
x = bx Mod 96
tempnum = Asc(InputStr) + x

If tempnum > 128 Then
tempnum = tempnum - 97

End If

InputStr = Chr(tempnum)
Text5.Text = Text5.Text + InputStr
zimunum = zimunum + 1
End If
If (Asc(InputStr) >= 0 And Asc(InputStr) < 32) Or Asc(InputStr) > 128 Then
Text5.Text = Text5.Text + InputStr
qitanum = qitanum + 1
End If
'******************************************IF(4)结束*************
End If

'**************************如果是汉字则执行***************************************

'**************************IF(1)开始*********************************************************************
If Asc(InputStr) < 0 Then

f = Hex(Asc(InputStr))
L1 = Format(CInt("&H" + Mid(f, 1, 2)) - 160, "00")
R1 = Format(CInt("&H" + Mid(f, 3, 2)) - 160, "00")


'*************************如果是繁体字***************
If L1 < 0 Or Val(R1) < 0 Then
InputStr = FToJ(InputStr)
f = Hex(Asc(InputStr))
L1 = Format(CInt("&H" + Mid(f, 1, 2)) - 160, "00")
R1 = Format(CInt("&H" + Mid(f, 3, 2)) - 160, "00")
jf = 1
End If
'***************************************************

'**************************IF(2)开始****************************
If Val(R1) >= 10 Then
strnum = L1 & R1
Text1.Text = Text1.Text + " " + strnum
hanzinum = Int(Len(Text1.Text) / 5) '计算汉字个数
tempstr = Mid$(Text1.Text, (i - zimunum - qitanum - 1) * 5 + 2, 4)
tempnum = Val(tempstr) + bx
If Val(tempstr) > 0 And Val(tempstr) < 1601 Then tempnum = Val(tempstr) '如果是符号的话则不变
If (Val(Mid$(Trim(tempnum), 3, 2)) >= 95 And Val(Mid$(Trim(tempnum), 3, 2)) <= 99) Or Val(Mid$(Trim(tempnum), 3, 2)) = 0 Then
tempnum = tempnum + bx
End If
If tempnum >= (8701 + bx) And tempnum <= (8794 + bx) Then tempnum = tempnum - (8701 + bx - 1601)


tempstr = Trim(tempnum)
If Val(tempnum) < 1000 And Val(tempnum) >= 100 Then tempstr = "0" & Trim(tempnum) '小于1000的符号的区位码复员
If Val(tempnum) < 100 And Val(tempnum) >= 10 Then tempstr = "00" & Trim(tempnum)
If Val(tempnum) < 10 And Val(tempnum) >= 0 Then tempstr = "000" & Trim(tempnum)
intQu = Mid$(tempstr, 1, 2)
intWei = Mid$(tempstr, 3, 2)
Str = Text1.Text
          Str = StrConv(Str, vbFromUnicode)
          Str = ChrB(&HA0 + intQu) & ChrB(&HA0 + intWei)
          Str = StrConv(Str, vbUnicode)
          Text5.Text = Text5.Text + Str
End If
'*******************************IF(2)结束*************************
'**************************IF(3)开始****************************************************
If Val(R1) < 10 And Val(R1) >= 0 Then
strnum = L1 & "0" & R1
Text1.Text = Text1.Text + " " + strnum
hanzinum = Int(Len(Text1.Text) / 5) '计算汉字个数
tempstr = Mid$(Text1.Text, (i - zimunum - qitanum - 1) * 5 + 2, 4)

tempnum = Val(tempstr) + bx
If Val(tempstr) > 0 And Val(tempstr) < 1601 Then tempnum = Val(tempstr) '如果是符号的话则不变
If (Val(Mid$(Trim(tempnum), 3, 2)) >= 95 And Val(Mid$(Trim(tempnum), 3, 2)) <= 99) Or Val(Mid$(Trim(tempnum), 3, 2)) = 0 Then
tempnum = tempnum + bx
End If
If tempnum >= (8701 + bx) And tempnum <= (8794 + bx) Then tempnum = tempnum - (8701 + bx - 1601)


tempstr = Trim(tempnum)

If Val(tempnum) < 1000 And Val(tempnum) >= 100 Then tempstr = "0" & Trim(tempnum) '小于1000的符号的区位码复员
If Val(tempnum) < 100 And Val(tempnum) >= 10 Then tempstr = "00" & Trim(tempnum)
If Val(tempnum) < 10 And Val(tempnum) >= 0 Then tempstr = "000" & Trim(tempnum)
intQu = Mid$(tempstr, 1, 2)
intWei = Mid$(tempstr, 3, 2)
Str = Text1.Text
          Str = StrConv(Str, vbFromUnicode)
          Str = ChrB(&HA0 + intQu) & ChrB(&HA0 + intWei)
          Str = StrConv(Str, vbUnicode)
          Text5.Text = Text5.Text + Str
End If
'*******************************IF(3)结束***********************************************

End If
'*******************************IF(1)结束**************************************************************


Next

Text3.Text = num
End Sub

Private Sub Text4_Change()
Dim Str As String
Dim intQu As Integer
Dim intWei As Integer
Dim tempstr
Dim tempnum
Dim num
Dim hanzinum As Integer
Dim zimunum As Integer
Dim qitanum As Integer
Dim f
Dim strnum
Dim L1, R1 As Integer
Dim InputStr As String
Dim i
If Text4.Text = "" Then
Text7.Text = ""
Text8.Text = ""

Text6.Text = ""
End If
Text7.Text = ""
Text6.Text = ""
zimunum = 0
qitanum = 0
num = Len(Text4.Text)

'**************************开始找当前字符***************************************

For i = 1 To num Step 1

If Text4.Text <> "" Then
InputStr = Text4.Text
InputStr = Mid$(InputStr, i, 1)

'**************************如果是英文和数字则执行IF(4)开始**********

If Asc(InputStr) >= 32 And Asc(InputStr) <= 128 Then
Dim x
x = bx Mod 96
tempnum = Asc(InputStr) - x

If tempnum < 32 Then
tempnum = tempnum + 97
End If

InputStr = Chr(tempnum)
  Text6.Text = Text6.Text + InputStr
  zimunum = zimunum + 1
End If

If (Asc(InputStr) >= 0 And Asc(InputStr) < 32) Or Asc(InputStr) > 128 Then
Text6.Text = Text6.Text + InputStr
qitanum = qitanum + 1
End If
'******************************************IF(4)结束*************
End If

'**************************如果是汉字则执行***************************************

'**************************IF(1)开始*********************************************************************
If Asc(InputStr) < 0 Then

f = Hex(Asc(InputStr))
L1 = Format(CInt("&H" + Mid(f, 1, 2)) - 160, "00")
R1 = Format(CInt("&H" + Mid(f, 3, 2)) - 160, "00")


'**************************IF(2)开始****************************
If Val(R1) >= 10 Then
strnum = L1 & R1
Text7.Text = Text7.Text + " " + strnum
hanzinum = Int(Len(Text7.Text) / 5) '计算汉字个数
tempstr = Mid$(Text7.Text, (i - zimunum - qitanum - 1) * 5 + 2, 4)
tempnum = Val(tempstr) - bx
If Val(tempstr) > 0 And Val(tempstr) < 1601 Then tempnum = Val(tempstr) '如果是符号的话则不变
If (Val(Mid$(Trim(tempnum), 3, 2)) >= 95 And Val(Mid$(Trim(tempnum), 3, 2)) <= 99) Or Val(Mid$(Trim(tempnum), 3, 2)) = 0 Then
tempnum = tempnum - bx
End If
If tempnum >= (1601 - bx) And tempnum <= (1674 - bx) Then tempnum = tempnum + (8701 + bx - 1601)


tempstr = Trim(tempnum)
If Val(tempnum) < 1000 And Val(tempnum) >= 100 Then tempstr = "0" & Trim(tempnum) '小于1000的符号的区位码复员
If Val(tempnum) < 100 And Val(tempnum) >= 10 Then tempstr = "00" & Trim(tempnum)
If Val(tempnum) < 10 And Val(tempnum) >= 0 Then tempstr = "000" & Trim(tempnum)
intQu = Mid$(tempstr, 1, 2)
intWei = Mid$(tempstr, 3, 2)
Str = Text7.Text
          Str = StrConv(Str, vbFromUnicode)
          Str = ChrB(&HA0 + intQu) & ChrB(&HA0 + intWei)
          Str = StrConv(Str, vbUnicode)
          If Check1.Value = 1 Then Text6.Text = Text6.Text + Str
          If Check2.Value = 1 Then Text6.Text = Text6.Text + JToF(Str)
End If
'*******************************IF(2)结束*************************
'**************************IF(3)开始****************************************************
If Val(R1) < 10 And Val(R1) >= 0 Then
strnum = L1 & "0" & R1
Text7.Text = Text7.Text + " " + strnum
hanzinum = Int(Len(Text7.Text) / 5) '计算汉字个数
tempstr = Mid$(Text7.Text, (i - zimunum - qitanum - 1) * 5 + 2, 4)

tempnum = Val(tempstr) - bx
If Val(tempstr) > 0 And Val(tempstr) < 1601 Then tempnum = Val(tempstr) '如果是符号的话则不变
If (Val(Mid$(Trim(tempnum), 3, 2)) >= 95 And Val(Mid$(Trim(tempnum), 3, 2)) <= 99) Or Val(Mid$(Trim(tempnum), 3, 2)) = 0 Then
tempnum = tempnum - bx
End If
If tempnum >= (1601 - bx) And tempnum <= (1674 - bx) Then tempnum = tempnum + (8701 + bx - 1601)


tempstr = Trim(tempnum)

If Val(tempnum) < 1000 And Val(tempnum) >= 100 Then tempstr = "0" & Trim(tempnum) '小于1000的符号的区位码复员
If Val(tempnum) < 100 And Val(tempnum) >= 10 Then tempstr = "00" & Trim(tempnum)
If Val(tempnum) < 10 And Val(tempnum) >= 0 Then tempstr = "000" & Trim(tempnum)
intQu = Mid$(tempstr, 1, 2)
intWei = Mid$(tempstr, 3, 2)
Str = Text7.Text
          Str = StrConv(Str, vbFromUnicode)
          Str = ChrB(&HA0 + intQu) & ChrB(&HA0 + intWei)
          Str = StrConv(Str, vbUnicode)
          If Check1.Value = 1 Then Text6.Text = Text6.Text + Str
          If Check2.Value = 1 Then Text6.Text = Text6.Text + JToF(Str)
End If
'*******************************IF(3)结束***********************************************

End If
'*******************************IF(1)结束**************************************************************


Next

Text8.Text = num

End Sub

⌨️ 快捷键说明

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