Jumat, 09 November 2012

Membuat ascii - hexa converter dengn VB

Assalamualaikum.......

*form
*texbox
*command button

source code
Private Sub Command1_Click()
Text1.Text = Replace(Text1.Text, "0", "30")
Text1.Text = Replace(Text1.Text, "1", "31")
Text1.Text = Replace(Text1.Text, "2", "32")
Text1.Text = Replace(Text1.Text, "3", "33")

Text1.Text = Replace(Text1.Text, "4", "34")
Text1.Text = Replace(Text1.Text, "5", "35")
Text1.Text = Replace(Text1.Text, "6", "36")
Text1.Text = Replace(Text1.Text, "7", "37")
Text1.Text = Replace(Text1.Text, "8", "38")
Text1.Text = Replace(Text1.Text, "9", "39")
Text1.Text = Replace(Text1.Text, "a", "61")
Text1.Text = Replace(Text1.Text, "b", "62")
Text1.Text = Replace(Text1.Text, "c", "63")
Text1.Text = Replace(Text1.Text, "d", "64")
Text1.Text = Replace(Text1.Text, "e", "65")
Text1.Text = Replace(Text1.Text, "f", "66")
Text1.Text = Replace(Text1.Text, "g", "67")
Text1.Text = Replace(Text1.Text, "h", "68")
Text1.Text = Replace(Text1.Text, "i", "69")
Text1.Text = Replace(Text1.Text, "j", "6a")
Text1.Text = Replace(Text1.Text, "k", "6b")
Text1.Text = Replace(Text1.Text, "l", "6c")
Text1.Text = Replace(Text1.Text, "m", "6d")
Text1.Text = Replace(Text1.Text, "n", "6e")
Text1.Text = Replace(Text1.Text, "o", "6f")
Text1.Text = Replace(Text1.Text, "p", "70")
Text1.Text = Replace(Text1.Text, "q", "71")
Text1.Text = Replace(Text1.Text, "r", "72")
Text1.Text = Replace(Text1.Text, "s", "73")
Text1.Text = Replace(Text1.Text, "t", "74")
Text1.Text = Replace(Text1.Text, "u", "75")
Text1.Text = Replace(Text1.Text, "v", "76")
Text1.Text = Replace(Text1.Text, "w", "77")
Text1.Text = Replace(Text1.Text, "x", "78")
Text1.Text = Replace(Text1.Text, "y", "79")
Text1.Text = Replace(Text1.Text, "z", "7a")
Text1.Text = Replace(Text1.Text, "A", "41")
Text1.Text = Replace(Text1.Text, "B", "42")
Text1.Text = Replace(Text1.Text, "C", "43")
Text1.Text = Replace(Text1.Text, "D", "44")
Text1.Text = Replace(Text1.Text, "E", "45")
Text1.Text = Replace(Text1.Text, "F", "46")
Text1.Text = Replace(Text1.Text, "G", "47")
Text1.Text = Replace(Text1.Text, "H", "48")
Text1.Text = Replace(Text1.Text, "I", "49")
Text1.Text = Replace(Text1.Text, "J", "4a")
Text1.Text = Replace(Text1.Text, "K", "4b")
Text1.Text = Replace(Text1.Text, "L", "4c")
Text1.Text = Replace(Text1.Text, "M", "4d")
Text1.Text = Replace(Text1.Text, "N", "4e")
Text1.Text = Replace(Text1.Text, "O", "4f")
Text1.Text = Replace(Text1.Text, "P", "50")
Text1.Text = Replace(Text1.Text, "Q", "51")
Text1.Text = Replace(Text1.Text, "R", "52")
Text1.Text = Replace(Text1.Text, "S", "53")
Text1.Text = Replace(Text1.Text, "T", "54")
Text1.Text = Replace(Text1.Text, "U", "55")
Text1.Text = Replace(Text1.Text, "V", "56")
Text1.Text = Replace(Text1.Text, "W", "57")
Text1.Text = Replace(Text1.Text, "X", "58")
Text1.Text = Replace(Text1.Text, "Y", "59")
Text1.Text = Replace(Text1.Text, "Z", "5a")
End Sub

semoga berguna..

[source] -DC-

Posting Lebih Baru Posting Lama Beranda

0 komentar:

Posting Komentar