Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Basic
 How to: Customize Snippet Code Once...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Basic: Samples 
How to: Customize Snippet Code Once It Is Inserted into Your Code 

When you add a snippet to your code, the inserted snippet code has one or more replacement points highlighted in the code. You may or may not choose to change each replacement point. If you rest your mouse pointer over the replacement point, a ToolTip appears that explains how you need to change the code. The Code Editor recognizes a snippet as a unit separate from your surrounding code until you close the source-code file. As such, the replacement points remain highlighted until you have closed the source file.

To customize the inserted code for your application

  1. Use the TAB key to move from one replacement point to the next. Use SHIFT+TAB to move to a previous replacement point.

  2. Click CTRL+SPACE to invoke IntelliSense.

  3. Select an item from the list, or type a replacement of your choice.

  4. If you still have compiler errors in the code, then you may need to make other changes to your source code. For example, if the task is searching for a node in a TreeView control named TreeView1, then you may need to add a TreeView control named TreeView1 to your form.

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker