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

📄 changenumber.cls.bak

📁 繁简转换的组件(含源代码)
💻 BAK
📖 第 1 页 / 共 2 页
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ChangeNumber"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Private a As New ADODB.Recordset
Private c As New ADODB.Recordset
Private b As New ADODB.Connection

Public Function ChangeWord(ChangeString As String) As String
Dim s, x, y, StrEnd As String
s = ChangeString
If IsEmpty(ChangeString) Then
    Exit Function
End If
If ChangeString = "" Then
    Exit Function
End If
While Len(s)
    x = Left(s, 1)
    s = Mid(s, 2, Len(s) - 1)
    y = Hex(Asc(x))
    If Len(y) = 4 Then
        a.AbsolutePosition = FindSite(y)
        a.Find "GbCode='" & y & "'"
        If a.AbsolutePosition > 0 Then
            StrEnd = StrEnd & Chr("&H" & a.Fields("bigcode"))
        Else
            StrEnd = StrEnd & x
        End If
    Else
        StrEnd = StrEnd & x
    End If
Wend
ChangeWord = StrEnd
End Function


Public Function ChangeT(ChangeString As String) As String
Dim s, x, y, StrEnd As String
s = ChangeString
If IsEmpty(ChangeString) Then
    Exit Function
End If
If ChangeString = "" Then
    Exit Function
End If
While Len(s)
    x = Left(s, 1)
    s = Mid(s, 2, Len(s) - 1)
    y = Hex(Asc(x))
    If Len(y) = 4 Then
        c.AbsolutePosition = FindCode(y)
        c.Find "bigCode='" & y & "'"
        If c.AbsolutePosition > 0 Then
            StrEnd = StrEnd & Chr("&H" & c.Fields("gbcode"))
        Else
            StrEnd = StrEnd & x
        End If
    Else
        StrEnd = StrEnd & x
    End If
Wend
ChangeT = StrEnd
End Function

Private Function FindCode(ByVal HaxNo As String) As Long
Select Case Left(HaxNo, 1)
Case "A"
    Select Case Mid(HaxNo, 2, 1)
    Case "1"
        FindCode = 1
        Exit Function
    Case "2"
        FindCode = 235
        Exit Function
    Case "3"
        FindCode = 369
        Exit Function
    Case "4"
        FindCode = 424
        Exit Function
    Case "5"
        FindCode = 586
        Exit Function
    Case "6"
        FindCode = 748
        Exit Function
    Case "7"
        FindCode = 907
        Exit Function
    Case "8"
        FindCode = 1075
        Exit Function
    Case "9"
        FindCode = 1246
        Exit Function
    Case "A"
        FindCode = 1408
        Exit Function
    Case "B"
        FindCode = 1576
        Exit Function
    Case "C"
        FindCode = 1743
        Exit Function
    Case "D"
        FindCode = 1910
        Exit Function
    Case "E"
        FindCode = 2091
        Exit Function
    Case "F"
        FindCode = 2265
        Exit Function
    End Select
Case "B"
    Select Case Mid(HaxNo, 2, 1)
    Case "0"
        FindCode = 24444
        Exit Function
    Case "1"
        FindCode = 2640
        Exit Function
    Case "2"
        FindCode = 2823
        Exit Function
    Case "3"
        FindCode = 3009
        Exit Function
    Case "4"
        FindCode = 3223
        Exit Function
    Case "5"
        FindCode = 3413
        Exit Function
    Case "6"
        FindCode = 3605
        Exit Function
    Case "7"
        FindCode = 3835
        Exit Function
    Case "8"
        FindCode = 4028
        Exit Function
    Case "9"
        FindCode = 4242
        Exit Function
    Case "A"
        FindCode = 4462
        Exit Function
    Case "B"
        FindCode = 4683
        Exit Function
    Case "C"
        FindCode = 4907
        Exit Function
    Case "D"
        FindCode = 5137
        Exit Function
    Case "E"
        FindCode = 5363
        Exit Function
    Case "F"
        FindCode = 5596
        Exit Function
    End Select

Case "C"
    Select Case Mid(HaxNo, 2, 1)
    Case "0"
        FindCode = 5832
        Exit Function
    Case "1"
        FindCode = 6073
        Exit Function
    Case "2"
        FindCode = 6312
        Exit Function
    Case "3"
        FindCode = 6566
        Exit Function
    Case "4"
        FindCode = 6817
        Exit Function
    Case "5"
        FindCode = 7071
        Exit Function
    Case "6"
        FindCode = 7335
        Exit Function
    Case "9"
        FindCode = 7446
        Exit Function
    Case "A"
        FindCode = 7598
        Exit Function
    Case "B"
        FindCode = 7751
        Exit Function
    Case "C"
        FindCode = 7908
        Exit Function
    Case "D"
        FindCode = 8062
        Exit Function
    Case "E"
        FindCode = 8219
        Exit Function
    Case "F"
        FindCode = 8375
        Exit Function
    End Select

Case "D"
    Select Case Mid(HaxNo, 2, 1)
    Case "0"
        FindCode = 8530
        Exit Function
    Case "1"
        FindCode = 8686
        Exit Function
    Case "2"
        FindCode = 8842
        Exit Function
    Case "3"
        FindCode = 8999
        Exit Function
    Case "4"
        FindCode = 9145
        Exit Function
    Case "5"
        FindCode = 9315
        Exit Function
    Case "6"
        FindCode = 9471
        Exit Function
    Case "7"
        FindCode = 9629
        Exit Function
    Case "8"
        FindCode = 9789
        Exit Function
    Case "9"
        FindCode = 9947
        Exit Function
    Case "A"
        FindCode = 10106
        Exit Function
    Case "B"
        FindCode = 10264
        Exit Function
    Case "C"
        FindCode = 10426
        Exit Function
    Case "D"
        FindCode = 10593
        Exit Function
    Case "E"
        FindCode = 10750
        Exit Function
    Case "F"
        FindCode = 10912
        Exit Function
    End Select

Case "E"
    Select Case Mid(HaxNo, 2, 1)
    Case "0"
        FindCode = 11072
        Exit Function
    Case "1"
        FindCode = 11240
        Exit Function
    Case "2"
        FindCode = 11406
        Exit Function
    Case "3"
        FindCode = 11568
        Exit Function
    Case "4"
        FindCode = 11729
        Exit Function
    Case "5"
        FindCode = 11891
        Exit Function
    Case "6"
        FindCode = 12054
        Exit Function
    Case "7"
        FindCode = 12217
        Exit Function
    Case "8"
        FindCode = 12317
        Exit Function
    Case "9"
        FindCode = 12547
        Exit Function
    Case "A"
        FindCode = 12711
        Exit Function
    Case "B"
        FindCode = 12875
        Exit Function
    Case "C"
        FindCode = 13041
        Exit Function
    Case "D"
        FindCode = 13211
        Exit Function
    Case "E"
        FindCode = 13370
        Exit Function
    Case "F"
        FindCode = 13537
        Exit Function
    End Select

Case "F"
    Select Case Mid(HaxNo, 2, 1)
    Case "0"
        FindCode = 13703
        Exit Function
    Case "1"
        FindCode = 13868
        Exit Function
    Case "2"
        FindCode = 14035
        Exit Function
    Case "3"
        FindCode = 14205
        Exit Function
    Case "4"
        FindCode = 14373
        Exit Function
    Case "5"
        FindCode = 14543
        Exit Function
    Case "6"
        FindCode = 14716
        Exit Function
    Case "7"
        FindCode = 14885
        Exit Function
    Case "8"
        FindCode = 15057
        Exit Function
    Case "9"
        FindCode = 15224
        Exit Function
    End Select
End Select
End Function

Private Function FindSite(ByVal HaxNo As String) As Long
Select Case Left(HaxNo, 1)
Case "8"
    Select Case Mid(HaxNo, 2, 1)
    Case "1"
        FindSite = 1
        Exit Function
    Case "2"
        FindSite = 73
        Exit Function
    Case "3"
        FindSite = 187
        Exit Function
    Case "4"
        FindSite = 297
        Exit Function
    Case "5"
        FindSite = 384
        Exit Function
    Case "6"
        FindSite = 476
        Exit Function
    Case "7"
        FindSite = 570
        Exit Function
    Case "8"
        FindSite = 675
        Exit Function
    Case "9"
        FindSite = 772

⌨️ 快捷键说明

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