Zero1UP
February 15th, 2009, 01:43 AM
Well this is what I have so far:
Dim code_address
Dim code_offset
Dim addition_code
Dim convert_code
Dim i As Integer
code_address = Convert.ToInt32(txt_code_address.Text, 16)
code_offset = Convert.ToInt32(txt_offset.Text, 16)
addition_code = code_address + code_offset
convert_code = Convert.ToString(addition_code, 16)
txt_answer.Text = convert_code
txt_answer.Text = (i.ToString.PadLeft(8, "0"c))
txt_answer.Text = (i.ToString.PadRight(8, "0"c))
What im trying to make is an offset calculator and I need the leading zeros to stay, before I tried to find a fix for it it worked just fine, just no zero's.
Any case as of now all it gives me is 8 zero's
Dim code_address
Dim code_offset
Dim addition_code
Dim convert_code
Dim i As Integer
code_address = Convert.ToInt32(txt_code_address.Text, 16)
code_offset = Convert.ToInt32(txt_offset.Text, 16)
addition_code = code_address + code_offset
convert_code = Convert.ToString(addition_code, 16)
txt_answer.Text = convert_code
txt_answer.Text = (i.ToString.PadLeft(8, "0"c))
txt_answer.Text = (i.ToString.PadRight(8, "0"c))
What im trying to make is an offset calculator and I need the leading zeros to stay, before I tried to find a fix for it it worked just fine, just no zero's.
Any case as of now all it gives me is 8 zero's