Microsoft Visual Basic 2010 Step by Step eBook

(Tina Meador) #1

Chapter 13 Exploring Text Files and String Processing 337


Encrypt text by changing ASCII codes


  1. Close the Sort Text project, and then open the Encrypt Text project located in the
    C:\Vb10sbs\Chap13\Encrypt Text folder.

  2. Click the Start Debugging button to run the program.

  3. Type the following text, or some text of your own, in the text box:


Here at last, my friend, you have the little book long since expected and
promised, a little book on vast matters, namely, β€œOn my own ignorance and that
of many others.”

Francesco Petrarca, c. 1368
The resulting application window and text look something like this:


  1. On the File menu, click the Save Encrypted File As command, and then save the file in
    the C:\Vb10sbs\Chap13 folder with the name Padua.txt.
    As you save the text file, the program scrambles the ASCII code and displays the results
    in the text box shown here:

Free download pdf