i have a function in a module that requries integer values. these values are set by the user typing in two textboxes on the form. the texboxes contain Hexadecimal data in string form.
function:
Friend Function addNewCode(ByVal Location As Integer, ByVal Opcode As Integer) As Boolean
If (Not LocStack.Count < 1000) Then
Form1.TextBox1.AppendText(vbCrLf)
Form1.TextBox1.AppendText("Cannot add new code. No room Left in queue!")
Return False
Else
LocStack.Push(Location)
opcStack.Push(Opcode)
Form1.TextBox1.AppendText(vbCrLf)
Form1.TextBox1.AppendText("Added New Code " & Hex(Location) & "-" & Hex(Opcode) & " in queue slot " & LocStack.Count - 1 & "!")
End If
Return True
End Function
and is called when a button is pressed on the form:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
addNewCode(Convert.ToInt32(TextBox1.Text, 16), Convert.ToInt32(TextBox3.Text, 16))
End Sub
However when the button is clicked, the program throws the following:
FormatException: cannot find recognizable digits
any ideas?
--Tandex (TTTHXC)