Drag and drop code onto the Toolbox

Versions:  2008,2010
Published:  1/24/2010
Code:  vstipTool0007

 

Got code you use all the time?  Have you been keeping a closet .TXT file to get your code from?  Well it's time to liberate yourself!  Start using the Toolbox for more than just controls.  When you are in the Editor the Toolbox looks like this:

image

 

This is a vast expanse of opportunity!  Just select some text and drag it into the Toolbox and see the magic happen:

image

 

Now you have code ready to go at anytime!  Just place the cursor where you want the code to go and double click on the item in your Toolbox:

image

 

 

You can also Click and Drag where you want the code to go:

image

 

There are a couple of extra things you can do as well:

  1. You can rename the code snippet to whatever you would like:

    image

  2. You can also create additional tabs to organize the code snippets:

    image