Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's WebLog


My adventures embracing open source on CodePlex and at Microsoft

News

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: ,
Posted: Thursday, April 10, 2008 3:00 AM by saraford

Comments

Danny said:

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

No more copy-paste from notepad for me!

Go Sarah Go! :)

# April 10, 2008 7:57 AM

Shivlee Aggarwal said:

Great, thats new thing for me.

# April 10, 2008 8:39 AM

Shivlee Aggarwal said:

Great, thats new thing for me.

# April 10, 2008 8:39 AM

danieldsmith said:

Wow awesome - I didn't know you could do that!

# April 10, 2008 8:42 AM

Antonio said:

Woooowwww... Awesome!!!!

That one really amaze me!!

# April 10, 2008 9:10 AM

Jimbo said:

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!

# April 10, 2008 5:38 PM

Michael said:

Sara,

Love the hat and thanks for the tip.

Mike M

# April 27, 2008 10:12 PM

Johan said:

That's awesome. Thank you Sara and Jimbo!

# April 28, 2008 11:30 AM

Jinx said:

That'll save some time.

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

Thanks

# April 30, 2008 8:32 AM

Shodin said:

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

# May 1, 2008 12:10 PM

Tom said:

It also works with copy and paste.

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

# May 2, 2008 1:33 PM

Scronker said:

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

# May 6, 2008 10:57 AM

Guru said:

Simple and very handy trick. Thanks Sarah

Guru

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

# May 15, 2008 3:12 AM

ollyb303 said:

Also works in 2005. Dead handy, thanks

# May 19, 2008 11:30 AM

Chuckgcs said:

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

# May 21, 2008 10:48 AM

dolzenko said:

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).

# May 23, 2008 2:01 PM

kiran said:

this feature already in vs2005

# May 26, 2008 12:18 AM

Filip said:

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

# May 28, 2008 9:50 PM

Jimmy Staff said:

This feature already in first version of dreamveawer..

# May 30, 2008 9:44 AM

Selim DURMUŞ said:

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

# May 31, 2008 8:26 PM

Amit said:

Hey friends!

It's not new.

This functionality inherited from VS2003...!

Just Try it!

# June 3, 2008 1:46 AM

Visual Studio 2008 ワンポイント said:

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

# August 8, 2008 2:15 AM

Visual Studio 2008 ワンポイント said:

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

# August 8, 2008 2:17 AM
New Comments to this post are disabled
Page view tracker