Create Your Own Encrypting and Decrypting Program

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
8 posts Page 1 of 1
Contributors
User avatar
Ximster
New Member
New Member
Posts: 10
Joined: Sat Jan 30, 2010 1:00 pm

Hey All... This is a tutorial on creating your own encrypting and decrypting application (With save and open function)

Stuff you need to add on form one..:

1 Tab Control:
- Page 1 Title : Encrypt Text
- Button 1 : Encrypt Text
- Show Encrypted Text Button : (Name) = showencrypt
- Textbox1

- Page 2 Title : Decrypt Text
- Button 2 : Decrypt Text
- Show Decrypted Text Button : (Name) = showdecrypt
- Textbox2

- Page 3 Title : Save Encrypted Text File
- Button 3 : Save

- Page 4 Title : Open Encrypted text File
- Button 4 : Open

-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
(So in total... it's:)
Button 1 - Encrypt Text
Button 2 - Decrypt Text
Button 3 - Save Encrypted Text File
Button 4 - Open Encrypted Text File
And Extra 2 Buttons: (Name) = showencrypt & (Name:) = showdecrypt

And you need 2 new forms:
Form2 should be EncryptedText.vb
Form3 should be DecryptedText.vb

And in EncryptedText Form, Add a Text Box, And same in DecryptedText Form

----
Now to the coding part....
----

Code For Button1:

Dim a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z As String
Dim outcome As String

a = "a"
b = "b"
c = "c"
'And so on....

outcome = TextBox1.Text

outcome = Replace(outcome, a, "01")
outcome = Replace(outcome, b, "02")
outcome = Replace(outcome, c, "03")

'... And so on... Tutorial might seem long if i pasted the whole thing so... I'll upload it to some other page..
'And then i'll leave the link at the bottom..

'This part of the code is for changing the capital letter...
outcome = Replace(outcome, "A", "01")
outcome = Replace(outcome, "B", "02")
outcome = Replace(outcome, "C", "03")
MsgBox("Text Decryption Successful")
EncryptedText.TextBox1.Text = outcome

Code For Button2:

Dim a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z As String
Dim outcome As String

a = "a"
b = "b"
c = "c"
'And so on....

outcome = TextBox2.Text

outcome = Replace(outcome, "01", "a")
outcome = Replace(outcome, "02", "b")
outcome = Replace(outcome, "03", "c")
'And so on....

outcome = Replace(outcome, "01", "A")
outcome = Replace(outcome, "02", "B")
outcome = Replace(outcome, "03", "C")
'And so on....

MsgBox("Text Decryption Successful")
DecryptedText.TextBox1.Text = outcome
Code For Button 3:

If EncryptedText.TextBox1.Text = "" Then
MsgBox("You Did Not Encrypt Any Text!")
Else
Dim SaveFile As New SaveFileDialog
SaveFile.FileName = ""
SaveFile.Filter = "Encrypted_Text|*.Encrypted_Text"
SaveFile.Title = "Save"
SaveFile.ShowDialog()
Try
Dim Writer As New System.IO.StreamWriter(SaveFile.FileName)
Writer.Write(EncryptedText.TextBox1.Text)
Writer.Close()
Catch ex As Exception
End Try

Code For Button 4:

Dim Open As New OpenFileDialog()
Dim myStreamReader As System.IO.StreamReader
Open.Filter = "Encrypted_Text|*.Encrypted_Text"
Open.CheckFileExists = True
Open.Title = "OpenFile"
Open.ShowDialog(Me)
Try
Open.OpenFile()
myStreamReader = System.IO.File.OpenText(Open.FileName)
TextBox2.Text = myStreamReader.ReadToEnd()
TabPage2.Select()
TabPage2.Show()
Catch ex As Exception
End Try

Code For "showencrypt":

EncryptedText.Show()

Code For "showdecrypt":

DecryptedText.Show()

---------------------------------------------------------------------
---------------------------------------------------------------------

See Full Tutorial At:

http://tinyurl.com/yfuad9v

Download Full Code At:

http://www.multiupload.com/NAQKYV1PVZ
User avatar
EwoudVL
New Member
New Member
Posts: 11
Joined: Fri Jan 29, 2010 8:07 am

Works perfect, very nice cooll; !
User avatar
35000vr
Top Poster
Top Poster
Posts: 176
Joined: Sat Mar 06, 2010 5:09 pm

Thank you for the tutorial cooll;
‼ <----- Copy it,it is together and if you backspace it it will both erase
☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"<-----Some Cool symbols.
♂<-----Boy Symbol :)
²ƽ<--------Mini 2 and 5!
ð<----Not sure what it is.
☺☻<-----Smiles
♪♫<----Music Notes
Others:ß┬ƒ○║■ã¿┼↑
User avatar
Philipp
Member
Member
Posts: 28
Joined: Mon Apr 05, 2010 12:08 pm

Working sooo perfect!!!
My Project: Indows Intersmart(Virtual OS in VB)
|-_______________| [3%]
User avatar
Ximster
New Member
New Member
Posts: 10
Joined: Sat Jan 30, 2010 1:00 pm

....Cool,........
User avatar
DreadNought
VIP - Donator
VIP - Donator
Posts: 116
Joined: Fri Jan 08, 2010 12:37 pm

I cant seem to get it to work anybody got a VB source they can give me please ?
Bound and boom tech,
The Future Of Coding
User avatar
Ximster
New Member
New Member
Posts: 10
Joined: Sat Jan 30, 2010 1:00 pm

paralyzer wrote:
I cant seem to get it to work anybody got a VB source they can give me please ?
whats the problem man,...

*Make sure u name all the forms and text boxes same like in the code (ex: Form2 should be EncryptedText.vb and Form3 should be DecryptedText.vb)

Please PM me with the exact problem you are having....
User avatar
Ximster
New Member
New Member
Posts: 10
Joined: Sat Jan 30, 2010 1:00 pm

PLEASE NOTE THAT YOU MIGHT GET SOME ERROR WITH THE LETTER "E" *Or Some Other) So if you do just change the ("e = "e") to ("ee = "e")
8 posts Page 1 of 1
Return to “Tutorials”