Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub reg_Click()
Dim i As Long
Dim s As String
s = txtName
Dim b(3) As Byte
If Len(s) < 2 Then Exit Sub
For i = 1 To Len(s)
b(i - 1) = Asc(Mid$(txtName, i, 1))
Next i
Open App.Path & "\1.txt" For Output As #1
Print #1, CStr(b(0)) & " " & CStr(b(3))
Close #1
Open App.Path & "\2.txt" For Output As #1
Print #1, CStr(b(2)) & " " & CStr(b(1))
Close #1
Open App.Path & "\3.txt" For Output As #1
Print #1, CStr(b(0)) & " " & CStr(b(1))
Close #1
Open App.Path & "\4.txt" For Output As #1
Print #1, CStr(b(2)) & " " & CStr(b(3)) & " 2"
Close #1
Dim bb() As Byte
For i = 1 To 7
Erase bb
bb = LoadResData(100 + i, "CUSTOM")
Open App.Path & "\" & CStr(i) & ".exe" For Binary As #1
Put #1, , bb
Close #1
Next i
Open App.Path & "\tmp.bat" For Output As #1
Print #1, "@echo off"
Print #1, "1.exe < 1.txt > 5.txt"
Print #1, "5.exe < 2.txt > 6.txt"
Print #1, "3.exe < 3.txt > 7.txt"
Print #1, "6.exe < 4.txt > 8.txt"
Print #1, "copy /b 5.txt+6.txt 9.txt"
Print #1, "copy /b 7.txt+8.txt 10.txt"
Print #1, "3.exe < 9.txt > 11.txt"
Print #1, "2.exe < 10.txt > 12.txt"
Print #1, "copy /b 11.txt+12.txt 13.txt"
Print #1, "7.exe < 13.txt > 14.txt"
Close #1
Sleep 500
Shell "tmp.bat", vbHide
Sleep 500
Do
If Dir(App.Path & "\14.txt") <> "" Then Exit Do
Loop
Sleep 500
Open App.Path & "\14.txt" For Input As #1
Line Input #1, s
Close #1
For i = 1 To 14
Kill App.Path & "\" & CStr(i) & ".txt"
If i <= 7 Then Kill App.Path & "\" & CStr(i) & ".exe"
Next i
Kill App.Path & "\tmp.bat"
Debug.Print s
If Trim$(txtNum) = Trim$(s) Then'由于CM重点不在此,所以明码
MsgBox "注册成功", vbOKOnly, ""
End
End If
End Sub
Private Sub Timer1_Timer()
Static r As Long, g As Long, b As Long
txtName.BackColor = RGB(r, g, b)
txtNum.BackColor = RGB(g, b, r)
Form1.BackColor = RGB(b, r, g)
reg.BackColor = RGB((r + g) Mod 256, (g + b) Mod 256, (b + r) Mod 256)
r = (r + 5) Mod 256
g = (g + 15) Mod 256
b = (b + 30) Mod 256
End Sub
Private Sub txtName_Change()
Dim i As Long
For i = 1 To Len(txtbname)
If Asc(Mid$(txtName, i, 1)) < 0 Then txtName = ""
Next i
End Sub