|
-
Nov 29th, 2010, 10:50 PM
#1
Thread Starter
New Member
Weird error with my code???
Here is a PIECE of my code, not the whole thing
Code:
Private Sub label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click
Dim serial As String
Dim length As Integer
Dim byteArray() As Byte
Dim badboy = 0
Dim badboy1 = 0
Dim badboy2 = 0
Dim badboy3 = 0
Dim badboy4 = 0
Dim seriall
length = TextBox1.TextLength
If length < 6 Then
MsgBox("Name must have 6 letters! Closing to prevent patching in a debugger :P", MsgBoxStyle.Information)
Me.Close()
ElseIf length = 6 Or length > 6 Then
serial = ""
serial = serial & TextBox1.Text.Chars(3)
serial = serial & TextBox1.Text.Chars(5)
byteArray = System.Text.ASCIIEncoding.ASCII.GetBytes(serial)
For i As Integer = 0 To byteArray.Length - 1
serial = serial + byteArray(i).ToString("x")
Next
serial = serial.ToUpper
Dim xxx = serial
If TextBox2.Text = serial Then
badboy = 0
Else
badboy = 1
If badboy = 1 Then
Else
badboy = 1
MsgBox("Incorrect serial! Make sure all letters are capitalized!")
badboy1 = 1
badboy2 = 1
badboy3 = 1
badboy4 = 1
MsgBox(serial)
End If
End If
End If
If badboy = 0 Then
seriall = ""
seriall = seriall & TextBox1.Text.Chars(4)
seriall = seriall & TextBox1.Text.Chars(0)
seriall = seriall & TextBox1.Text.Chars(1)
byteArray = System.Text.ASCIIEncoding.ASCII.GetBytes(seriall)
For ilaw As Integer = 0 To byteArray.Length - 1
seriall = seriall + byteArray(ilaw).ToString("x")
Next
seriall = seriall.ToUpper
ilaw = 0
If TextBox3.Text = seriall Then
ilaw = ilaw + 1
Else
If badboy = 1 Then
Else
badboy = 1
badboy1 = 1
badboy2 = 1
MsgBox("Incorrect seriall! Make sure all letters are capitalized!")
badboy3 = 1
MsgBox(seriall)
badboy4 = 1
End If
End If
If badboy = 0 Then
End If
End If
End Sub
It is for a shareware program, but when i click on label 4, it freezes. If you want the full thing, i can give it to you, but it will be stripped of most things. Thanks in advance 
PS. the badboy1 - 4 are so debuggers get messed up, and can't serial phish.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|