![]()
×
|
'Chuyen doi giua Hex to Int
Dim strHex As String = TextBox1.Text
Dim i As Integer
i = Convert.ToInt32(strHex, 16)
MessageBox.Show(strHex & "=" & i.ToString(), "Hex to Int")
'Chuyen tu Int to Bin
Dim binary As String = Convert.ToString(i, 2)
MessageBox.Show(i.ToString() + "=" & binary, "In to Bin")
'Chuyen tu Bin to Int
Dim n As Integer = Convert.ToInt32(binary, 2)
MessageBox.Show(binary & "=" & n.ToString(), "Bin to Int")
'Chuyen tu Int sang Octal
Dim Octal As String = Convert.ToString(n, 8)
MessageBox.Show(n.ToString() + "=" & Octal, "Int to Octal")
'Chuyen tu Octal to Int
Dim m As Integer = Convert.ToInt32(Octal, 8)
MessageBox.Show(Octal & "=" & m.ToString(), "Octal to Int")
'Chuyen tu Int to Hex
Dim hex As String = Convert.ToString(m, 16)
MessageBox.Show(m.ToString() + "=" & hex, "Int to Hex")
MessageBox.Show("Good Luck!", "www.chiasethongtin.com")