- This topic has 4 replies, 2 voices, and was last updated 18 years ago by Admin.
-
AuthorPosts
-
February 2, 2006 at 1:27 pm #189048dNightMareMember
Hey peeps,
I need to know how to make some kind of an encryption in vb .I mean for example 2 text boxes with one commad button . when the user puts the text in the fist box his message is encrypted with a simple key . lets say when the user inputs “AAAA” the message in the second box shows “ZZZZ” for example I hope this idea is clear π sorry I’m starting to play with vb so not much I know π . I searched google many times but no luck I hope to find a solution in your great forum and please would you put an example πRegargs.
February 2, 2006 at 4:23 pm #189052AdminAdministratorI think you can do it like this
Sub script()
Text2.Text = Replace(Text1.Text, "a", "ΓΖΓβΓβΓΒ’")
Text2.Text = Replace(Text1.Text, "b", "ΓΖΓβΓβ¦ΓΒΈ")
Text2.Text = Replace(Text1.Text, "c", "ΓΖΓβΓΒ’Γ’βΒ¬ΓΒ‘")
Text2.Text = Replace(Text1.Text, "d", "ΓΖΓβΓβΓΒ")
Text2.Text = Replace(Text1.Text, "e", "ΓΖΓβΓβΓΒ«")
Text2.Text = Replace(Text1.Text, "f", "F")
Text2.Text = Replace(Text1.Text, "g", "G")
Text2.Text = Replace(Text1.Text, "h", "H")
Text2.Text = Replace(Text1.Text, "i", "ΓΖΓβΓβΓΒ")
Text2.Text = Replace(Text1.Text, "j", "J")
Text2.Text = Replace(Text1.Text, "k", "K")
Text2.Text = Replace(Text1.Text, "l", "ΓΖΓ’β¬Ε‘ΓβΓΒ£")
Text2.Text = Replace(Text1.Text, "m", "M")
Text2.Text = Replace(Text1.Text, "n", "ΓΖΓβΓΒ’Γ’βΒ¬ΓΕ")
Text2.Text = Replace(Text1.Text, "o", "0")
Text2.Text = Replace(Text1.Text, "p", "ΓΖΓβΓβΓΒΎ")
Text2.Text = Replace(Text1.Text, "q", "Q")
Text2.Text = Replace(Text1.Text, "r", "R")
Text2.Text = Replace(Text1.Text, "s", "ΓΖΓ’β¬Ε‘ΓβΓΒ§")
Text2.Text = Replace(Text1.Text, "t", "T")
Text2.Text = Replace(Text1.Text, "u", "ΓΖΓβΓβΓΒΊ")
Text2.Text = Replace(Text1.Text, "v", "V")
Text2.Text = Replace(Text1.Text, "w", "W")
Text2.Text = Replace(Text1.Text, "x", "ΓΖΓβΓΒ’Γ’β¬Òβ¬Β")
Text2.Text = Replace(Text1.Text, "y", "ΓΖΓβΓβΓΒ")
Text2.Text = Replace(Text1.Text, "z", "Z")
End Subthen on a command button
call script
so what ever you type on text1 will be change on text two π and u need to change to what u want to change the letter too for example Text2.Text = Replace(Text1.Text, “a”, “ΓΖΓβΓβΓΒ’”) you can change it, lets say you want a to be z then u do it like this Text2.Text = Replace(Text1.Text, “a”, “z”) thats it, I think there othe ways but thats the way i done it π
February 2, 2006 at 5:46 pm #189051dNightMareMemberwow thank you so much Admin π . I can’t wait I’ll try it .
Thanks again π tc .
February 3, 2006 at 12:12 pm #189050dNightMareMemberHi Admin .
I tried your code but it only processes the last line : i.e:Text2.Text = Replace(Text1.Text, "y", "ΓΖΓβΓβΓΒ")
Text2.Text = Replace(Text1.Text, "z", "Z")the remaining lines just pasted the same char for example y printed as y not “ΓΖΓβΓβΓΒ” :/
please I need help I want it to process all the chars any ideas whats wrong !!!Thanks in advance.
February 3, 2006 at 3:36 pm #189049AdminAdministratorumm thas weird are u using capitals letters, another thing send me ur code private if u want me to take a look at it 8)
-
AuthorPosts
Related
- You must be logged in to reply to this topic.