Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'a sample value to show you how your Hex shoudl be as a string
TextBox1.Text = 1521.ToString("X")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim thevalue As Integer
Dim numberstyle As System.Globalization.NumberStyles
numberstyle = System.Globalization.NumberStyles.HexNumber
Try
thevalue = Integer.Parse(TextBox1.Text, numberstyle)
TextBox2.Text = thevalue.ToString
Catch
MessageBox.Show("Sorry, could not convert " & TextBox1.Text & " to ""decimal"" integer")
End Try
End Sub
End Class
Last edited by Cimperiali; August 12th, 2011 at 03:13 AM.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.