Aplikasi 4L@ÿ Generator
Apakah Anda sering menulis sesuatu dengan gaya Alay seperti update status Facebook, chat di YM, nge-Blog. Sebenarnya Anda bisa membuat tulisan Alay lebih mudah dengan membuat aplikasi generatornya sendiri menggunakan Visual Basic.
Buat sebuah Module baru dan ketikkan :
Public Function Alay(ByVal Str As String) As String
Dim s As String, h As String, i As Integer
Str = LCase(Str)
For i = 1 To Len(Str)
s = Mid(Str, i, 1)
Select Case s
Case "a": s = "àáâãäåÀÁÂÃÄÅ@4"
Case "b": s = "ß8"
Case "c": s = "çÇ¢"
Case "d": s = "Ð"
Case "e": s = "èéêëÈÉÊË£3"
Case "g": s = "69"
Case "i": s = "ìíîïÌÍÎÏ¡!1"
Case "n": s = "ñÑ"
Case "o": s = "òóôõöøÒÓÔÕÖØ0"
Case "p": s = "þÞ"
Case "s": s = "$§5"
Case "t": s = "7"
Case "u": s = "ùúûüÙÚÛܵ"
Case "x": s = "×"
Case "y": s = "ýÿÝ¥"
Case Else: s = IIf(CInt(Rnd * 1) = 0, UCase(s), s)
End Select
Randomize
h = h & Mid(s, CInt(Rnd * (Len(s) - 1)) + 1, 1)
Next
Alay = h
End Function
Dim s As String, h As String, i As Integer
Str = LCase(Str)
For i = 1 To Len(Str)
s = Mid(Str, i, 1)
Select Case s
Case "a": s = "àáâãäåÀÁÂÃÄÅ@4"
Case "b": s = "ß8"
Case "c": s = "çÇ¢"
Case "d": s = "Ð"
Case "e": s = "èéêëÈÉÊË£3"
Case "g": s = "69"
Case "i": s = "ìíîïÌÍÎÏ¡!1"
Case "n": s = "ñÑ"
Case "o": s = "òóôõöøÒÓÔÕÖØ0"
Case "p": s = "þÞ"
Case "s": s = "$§5"
Case "t": s = "7"
Case "u": s = "ùúûüÙÚÛܵ"
Case "x": s = "×"
Case "y": s = "ýÿÝ¥"
Case Else: s = IIf(CInt(Rnd * 1) = 0, UCase(s), s)
End Select
Randomize
h = h & Mid(s, CInt(Rnd * (Len(s) - 1)) + 1, 1)
Next
Alay = h
End Function
Selanjutnya, buat sebuah Form baru dengan 2 buah kontrol TextBox didalamnya.
[ VB 6.0 ]
Di bagian 'Text1_Change' ketikkan :
Text2.Text = Alay(Text1.Text)
[ VB .NET ]di bagian 'TextBox1_TextChanged' ketikkan :
TextBox2.Text = Alay(TextBox1.Text)
Jalankan aplikasi, kemudian coba ketikkan teks di TextBox yang pertama !
Label: (Menengah), Aplikasi, Fungsi dan Prosedur, VB .NET, VB 6.0
0 Komentar:
Posting Komentar
Pengunjung yang baik selalu meninggalkan jejak berupa komentar. :)
Berlangganan Posting Komentar [Atom]
<< Beranda