The Hex value is actually a string. You need to convert the decimal string from the textbox into a number and convert it back to a string with the option to display it as a Hex value. Here is the code:
Code:
Dim num As Integer
Integer.TryParse(TextBox1.Text, num)
TextBox2.Text = Convert.ToString(num, 16).ToUpper
Note: You can convert to binary or octal just as easily by replacing the 16 with a 2 or an 8.