帮忙解释这段代码
Private Sub Command1_Click()Text1.Text = UnEnscape(Text2.Text)
End Sub
Private Sub Command2_Click()
Text2.Text = Enscape(Text1.Text)
End Sub
Private Sub Form_Load()
Command1.Enabled = False
Command2.Enabled = False
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = RGB(255, 255, 255)
End Sub
Private Sub Label3_Click()
MsgBox "版权所有:黑蚂蚁" + vbCrLf + "2008-9-12 17:22", vbOKOnly, "关于"
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = RGB(100, 200, 20)
End Sub
Private Sub Label3_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = RGB(255, 255, 255)
End Sub
Private Sub Text1_Change()
Command1.Enabled = False
Command2.Enabled = True
End Sub
Private Sub Text2_Change()
Command1.Enabled = True
Command2.Enabled = False
End Sub
Function ChangeToChar(CharAsc As Long)
On Error GoTo OnError
ChangeToChar = ChrW(CharAsc)
Exit Function
OnError:
Exit Function
End Function
Function UnEnscape(enstr As String) As String
Dim DataLen As Long
Dim TempData As String
Dim filepoint As Long
Dim ChinaText As Long
DataLen = Len(enstr)
filepoint = 1
Do While (filepoint <= DataLen)
If Mid(enstr, filepoint, 1) = "%" Then
If Mid(enstr, filepoint + 1, 1) = "u" Then
On Error Resume Next
ChinaText = CLng("&H" + Mid(enstr, filepoint + 2, 4))
TempData = TempData + ChangeToChar(ChinaText)
filepoint = filepoint + 6
Else
TempData = TempData + ChrW(CLng("&H" + Mid(enstr, filepoint + 1, 2)))
filepoint = filepoint + 3
End If
Else
TempData = TempData + Mid(enstr, filepoint, 1)
filepoint = filepoint + 1
End If
Loop
UnEnscape = TempData
End Function
Function Enscape(enstr As String) As String
Dim OutPutStr As String
Dim TmpStr As String
Dim DataLen As Long
TmpStr = ""
DataLen = Len(enstr)
Dim TempNum As Long
For i = 1 To DataLen
TempNum = AscW(Mid(enstr, i, 1))
Debug.Print TempNum
If TempNum < 16 And TempNum > 0 Then
TmpStr = TmpStr + "%0" + Hex(TempNum)
ElseIf 48 <= TempNum And TempNum <= 57 Then
TmpStr = TmpStr + Mid(enstr, i, 1)
ElseIf 65 <= TempNum And TempNum <= 90 Then
TmpStr = TmpStr + Mid(enstr, i, 1)
ElseIf 97 <= TempNum And TempNum <= 122 Then
TmpStr = TmpStr + Mid(enstr, i, 1)
ElseIf 16 <= TempNum And TempNum < 256 Then
TmpStr = TmpStr + "%" + Hex(TempNum)
ElseIf 4096 > TempNum And TempNum >= 256 Then
If TempNum > 0 Then
TmpStr = TmpStr + "%u0" + Hex(TempNum)
Else
TmpStr = TmpStr + "%u0" + Hex(CLng(&H10000) + TempNum)
End If
ElseIf Abs(TempNum) >= 4096 Then
If TempNum > 0 Then
TmpStr = TmpStr + "%u" + Hex(TempNum)
Else
TmpStr = TmpStr + "%u" + Hex(CLng(&H10000) + TempNum)
End If
End If
Next
Enscape = TmpStr
End Function
这个是HTML 16进制加码解码谁帮我把每句代码意思给我解释下