Did you know… You can drag and drop code onto the Toolbox General tab? – #191


Today’s tip is especially helpful if you are going to write code in a presentation.  Now you don’t have to code in front of everyone, but rather have it all typed up on the side, ready to go!

You’ve probably noticed the Toolbox General tab showing this information by default.

General Toolbox Tab

Probably one of the best kept "secrets" is that you can actually drag and drop code onto the toolbox.  Just highlight some text and then Click+Drag that text into the General tab.  you’ll see the following.

ToolboxGeneralTab2

Technorati Tags: VS2005Tip,VS2008Tip

Comments (29)

  1. Danny says:

    That’s one useful (and well hidden) trick!

    No more copy-paste from notepad for me!

    Go Sarah Go! 🙂

  2. Great, thats new thing for me.

  3. Great, thats new thing for me.

  4. danieldsmith says:

    Wow awesome – I didn’t know you could do that!

  5. Antonio says:

    Woooowwww… Awesome!!!!

    That one really amaze me!!

  6. Jimbo says:

    But wait…there’s more!  If you pay attention to this comment, you’ll also get the ability to give the entry a useful name, all for no additional cost!

    Simply right-click the item and select "Rename Item"  Your old code clips can go from ugly to useful in seconds!  

    Try this tip now and get an additional bonus…copy and paste work too!  That’s right…you get not only the originally mentioned click & drag method but also the copy & paste method, absolutely free with your VS!  Who wouldn’t want that kind of redundancy in a development tool?

    Alas, no operators are standing by…unless Sara wants to post her extension…  

    Thanks for bringing all these useful ideas together for us to share…Sara you rock!

  7. Michael says:

    Sara,

    Love the hat and thanks for the tip.

    Mike M

  8. Johan says:

    That’s awesome. Thank you Sara and Jimbo!

  9. Jinx says:

    That’ll save some time.

    I’ve already started copying my favourite functions and subs.

    Thanks

  10. Shodin says:

    Ah, I always wondered what the hell that General tab was for!  I love finding little tips like this.  🙂

  11. Tom says:

    It also works with copy and paste.

    Select code, Ctrl+C, switch to Toolbox/General, Ctrl+V.

  12. Scronker says:

    What a brilliant idea. I wish I’d known this before. It’ll save loads of work!

  13. Guru says:

    Simple and very handy trick. Thanks Sarah

    Guru

    "Make everything as simple as possible, but not simpler"

  14. ollyb303 says:

    Also works in 2005. Dead handy, thanks

  15. Chuckgcs says:

    Arrrrghhh,  So much fun stuff to learn; so little time!

  16. dolzenko says:

    Amazing tip! Dropping knowledge as usual!

    I never ever liked the idea of keeping code snippets in macros bound to some cryptic keyboard shortcut, and I can’t use native snippets system because VS allows it only for C# and VB (and I have to work on PHP and Ruby stuff as well).

  17. kiran says:

    this feature already in vs2005

  18. Filip says:

    I love it!  The tip saves me a lot of time. Thanks a lot!

  19. Jimmy Staff says:

    This feature already in first version of dreamveawer..

  20. Selim DURMUŞ says:

    Thank you very much for the tip. And the hat is really lovely 🙂

  21. Amit says:

    Hey friends!

    It’s not new.

    This functionality inherited from VS2003…!

    Just Try it!

  22. 今日のヒントは、プレゼンテーションでコードを記述する予定がある場合は特に役立ちます。 皆の前でコードを記述する必要がなくなり、全部作成済みの状態で用意しておくことができます。ではやってみましょう。 既定では、[Toolbox]

  23. 今日のヒントは、プレゼンテーションでコードを記述する予定がある場合は特に役立ちます。 皆の前でコードを記述する必要がなくなり、全部作成済みの状態で用意しておくことができます。ではやってみましょう。 既定では、[Toolbox]

  24. CanOz Blog says:

    Drag and drop code to and from ToolBox Sara Ford blogged about this a couple of days ago and I thought

  25. CanOz Blog says:

    Drag and drop code to and from toolbox (part II) After posting up about this feature of Visual Studio

  26. DJ's Blog says:

    Sara Ford blogged about this a couple of days ago and I thought it was a really cool feature of Visual

  27. DJ's Blog says:

    After posting up about this feature of Visual Studio I got to messing around with it a bit. ( Sara Ford's

  28. Tip #0 Know your Keybindings! General Development Settings Searching Tips Tip #1 How to behold the power

Skip to main content