204 Part II Programming Fundamentals
- Create a new button object in the middle of the form, and set the Text property of the
button to “Display Windows Version .” - 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.
- 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.