Microsoft Visual Basic 2010 Step by Step eBook

(Tina Meador) #1

206 Part II Programming Fundamentals


Windows has the ability to be updated automatically over the Web each time a new
security update or improvement is released. Examining the version number is therefore
a handy way to see whether your system is up-to-date and safe.
You’ll also notice that I used vbCr. This is a constant that represents a carriage return.
This can be used as an alternative to the Chr(13) statement that was used earlier in the
chapter. There are several of these constants that can be helpful. When you type vb in
the Code Editor, you’ll see a list of all these constants. Your screen looks like this:


  1. Click the Save All button to save your changes, and specify the C:\Vb10sbs\Chap07
    folder as the location.

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


Visual Studio runs the program in the IDE.


  1. Click the Display Windows Version button to display the version information returned
    by the snippet.
    Your dialog box looks similar to the following:

  2. Click OK to close the dialog box, and then click the Close button to end the program.

Free download pdf