Microsoft Visual Basic 2010 Step by Step eBook

(Tina Meador) #1

204 Part II Programming Fundamentals



  1. Create a new button object in the middle of the form, and set the Text property of the
    button to “Display Windows Version .”

  2. Double-click the button object to display the Button1_Click event procedure.


Now you’ll use the Insert Snippet command to insert a code template that automatically
returns information about the version of Windows installed on your computer. Note that
this particular snippet is just one example from a list of dozens of useful code templates.


  1. Click the Edit menu, point to the IntelliSense submenu, and then click the Insert Snippet
    command.
    The Insert Snippet list box appears in the Code Editor, as shown in the following
    screen shot. Depending on what components of Visual Studio you have installed, your
    snippet list will have some differences.


Tip You can also open the snippet list by right-clicking in the Designer and selecting
Insert Snippet.

The Insert Snippet list box is a navigation tool that you can use to explore the snippet
library and insert snippets into your program at the insertion point. To open a folder in
the list box, double-click the folder name. To return to the previous folder in the folder
hierarchy, press the BACKSPACE key.
Free download pdf