Dim s As String, ch As String
Dim i As Integer, data As Integer
Const n = 8
Private Sub Form_Load()
For i = 1 To n
'随机生成n位小写字母显示在文本框Text1中
Next i
End Sub
Private Sub Command1_Click()
Dim count As Integer, j As Integer, m As Integer
Dim a(1 To 64) As Integer
Dim b(1 To 64) As Integer
Const sj = "0123456789ABCDEF"
s = Text1.Text: count = 0
For i = 1 To Len(s)
data = Asc(Mid(s, i, 1))
Do While count <> n
data = data \ 2
count = count + 1
Loop
count = 0
Next i
tmp = 0
For m = 1 To n * n
i = (m - 1) \ n + 1: j = (m - 1) Mod n + 1
b((i - 1) * n + j) =
s1 = s1 + Str(b((i - 1) * n + j))
If j Mod n = 0 Then List1.AddItem s1: s1 = ""
tmp =
If j = 4 Or j = 8 Then
s2 = s2 + Mid(sj, tmp + 1, 1): tmp = 0
End If
Next m
Text2.Text = s2
End Sub