by john tomson (9 Submissions)
Category: Miscellaneous
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Tue 15th November 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)
encrypt text with numbers
API Declarations
commandbutton called EN, DE
Dim I As Integer
I = 1
Dim LeftPart
Do While True
If Check1 Then
I = InStr(1, Entire, Word) 'This is not case-sensitive:
Else
I = InStr(1, UCase$(Entire), UCase$(Word)) 'This is case sensitive
End If
If I = 0 Then
Exit Do
Else
LeftPart = Left(Entire, I - 1)
Entire = LeftPart & Replace & Right(Entire, Len(Entire) - Len(Word) - Len(LeftPart))
End If
Loop
text1.Text = ""
text1.Text = Entire
End Sub
Private Sub EN_Click()
RemoveString text1.Text, "a", "10"
RemoveString text1.Text, "b", "20"
RemoveString text1.Text, "c", "30"
RemoveString text1.Text, "d", "40"
RemoveString text1.Text, "e", "50"
RemoveString text1.Text, "f", "60"
RemoveString text1.Text, "g", "70"
RemoveString text1.Text, "h", "80"
RemoveString text1.Text, "i", "90"
RemoveString text1.Text, "j", "21"
RemoveString text1.Text, "k", "31"
RemoveString text1.Text, "l", "41"
RemoveString text1.Text, "m", "51"
RemoveString text1.Text, "n", "61"
RemoveString text1.Text, "o", "71"
RemoveString text1.Text, "p", "81"
RemoveString text1.Text, "q", "91"
RemoveString text1.Text, "r", "32"
RemoveString text1.Text, "s", "42"
RemoveString text1.Text, "t", "52"
RemoveString text1.Text, "u", "62"
RemoveString text1.Text, "v", "72"
RemoveString text1.Text, "w", "82"
RemoveString text1.Text, "x", "92"
RemoveString text1.Text, "y", "43"
RemoveString text1.Text, "z", "53"
On Error Resume Next
End Sub
Private Sub DE_Click()
RemoveString text1.Text, "10", "a"
RemoveString text1.Text, "20", "b"
RemoveString text1.Text, "30", "c"
RemoveString text1.Text, "40", "d"
RemoveString text1.Text, "50", "e"
RemoveString text1.Text, "60", "f"
RemoveString text1.Text, "70", "g"
RemoveString text1.Text, "80", "h"
RemoveString text1.Text, "90", "i"
RemoveString text1.Text, "21", "j"
RemoveString text1.Text, "31", "k"
RemoveString text1.Text, "41", "l"
RemoveString text1.Text, "51", "m"
RemoveString text1.Text, "61", "n"
RemoveString text1.Text, "71", "o"
RemoveString text1.Text, "81", "p"
RemoveString text1.Text, "91", "q"
RemoveString text1.Text, "32", "r"
RemoveString text1.Text, "42", "s"
RemoveString text1.Text, "52", "t"
RemoveString text1.Text, "62", "u"
RemoveString text1.Text, "72", "v"
RemoveString text1.Text, "82", "w"
RemoveString text1.Text, "92", "x"
RemoveString text1.Text, "43", "y"
RemoveString text1.Text, "53", "z"
On Error Resume Next
End Sub