Sabtu, 22 Desember 2012

Contoh : Aplikasi Enkripsi-Deskripsi Pada Visual Basic


listingnya :


Private Sub CmdEnkrip_Click()
Dim Enkrip, Output, Inputan As String
Dim Panjang_Input As Integer
Inputan = Text1.Text
Panjang_Input = Len(Text1.Text)
For i = 1 To Panjang_Input
Enkrip = Mid(Inputan, i, 1)
Enkrip = Asc(Enkrip)
Enkrip = (Enkrip + 20) - 43
Enkrip = Chr(Enkrip)
Output = Output & Enkrip
Next i
Text2.Text = Output
End Sub
Private Sub CmdDekrip_Click()
Dim Dekrip, Output, Inputan As String
Dim Panjang_Input, Pesan As Integer
Inputan = Text3.Text
Panjang_Input = Len(Text3.Text)
For i = 1 To Panjang_Input
Dekrip = Mid(Inputan, i, 1)
Dekrip = Asc(Dekrip)
Dekrip = (Dekrip - 20) + 43
Dekrip = Chr(Dekrip)
Output = Output & Dekrip
Next i
Text4.Text = Output
End Sub
Private Sub CmdHapus_Click()
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
End Sub
Private Sub CmdExit_Click()
End
End Sub

Private Sub Form_Load()

End Sub

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes