Thursday, July 31, 2008

image

image

 A place for everything, everything in its place.
Benjamin Franklin

 

 

 

 

 

 

Many times I find that throughout my word day I have move and resized many of the various elements in the Visual Studio IDE. I might have expanded my properties windows, in order to see more of the property name. And I might have end up needing to shrink my toolbox window so I could see more of my code on the screen at one time. But sometimes you just want to hit reset and have everything go back to where it belongs.

Reset Window Layout

Alt, W, R

Note: The preceding image will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Thursday, July 31, 2008 4:25:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Wednesday, July 30, 2008
image

I came, I coded, I compiled. If only Julius Caesar had been a developer, maybe Duke Nukem Forever would be released by now. So you made a quick change and need to build the solution as fast as possible and get it to the QA department now. What is the fastest way to do this?

Build Solution

Ctrl + Shift + B

Note: The preceding image will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Wednesday, July 30, 2008 4:48:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback

image Pretty cool tip I learned about today on Digital Inspiration.

Vista SP1 is a BIG update, and it does not remove any of the files it replaces. This is because Vista SP1 allows you to uninstall Vista SP1, and rollback to your previous version of Vista. Unless you are Chuck Norris, I have a feeling you aren’t going to even consider this. So why not reclaim this 800+ megabytes worth of hard drive space?

Windows Vista SP1 Clean Up Tool

Go to the command prompt, and simply enter the following: vsp1cln.exe. It is fast, and I’ve tried it on several machines so far.

image

Here’s the official Microsoft TechNet documentation

Windows Vista SP1 File Removal tool (Vsp1cln.exe). Vsp1cln.exe is an optional tool that you can run after you install SP1. This tool removes older versions of components that have been updated in SP1, which are stored during the installation in case you need to uninstall SP1 later. Saving these older components increases the amount of disk space that is used. Typically, you should run Vsp1cln.exe if you want to reclaim this disk space after applying SP1 and if you will not need to uninstall SP1. Note, however, that you cannot uninstall SP1 after you run this tool. You can use this tool both online and offline, but you must have SP1 installed and you must use the correct version of the tool. If you are running this file on an offline image, you should use the Vsp1cln.exe included in the Windows OPK or AIK. However, if you are running this file online (on a computer that you are booted into), you should use the Vsp1cln.exe file located at %windir%\system32\vsp1cln.exe.

Hope it helps!


Wednesday, July 30, 2008 4:25:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Tuesday, July 29, 2008

image

Output is pretty much the bread and butter of any application. Visual Studio has a whole window that is dedicated to dealing with various trace information. Sometime we would like to be able to save and view this information later or in another utility. But it is a real pain to do this process manually. There has to be an easier way…

Save Any Output Window

Ctrl + S

Note: The preceding image will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Tuesday, July 29, 2008 4:16:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Monday, July 28, 2008

imageSo you have all kinds of windows and documents open in Visual Studio, everything from form designers to XML editors. Now you want to close everything and start something else, and you’re in a big hurry. What do you do?

Close All Documents

Alt + W, L

Note: The preceding image will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Monday, July 28, 2008 4:06:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Sunday, July 27, 2008

One of the things I really like about working for ACS Technologies is we create software solutions for almost every OS platform out there. We are mostly a Microsoft shop, which is a perfect fit for me, but because we write solutions for churches and schools many of our products also work with other OS platforms. Really puts me in a great position to see the good and the bad for various solution platforms whether it is Windows Mobile, the iPhone, OS X, ASP .NET, and so on. I love it.

I while back I could resist picking up a used Apple PowerBook off eBay for a deal. I’ve been playing with it off an on since then and it's not all bad. One thing I have been disappointed with is until recently I haven’t been able to figure out how to connect to my laptop remotely from one of my other PC’s. Today I decided I would solve this problem.

Here’s the way I found to allow Remote Desktop Administration of an Apple from a PC:

Apple PC

Go to System Preferences, then open Sharing, in the Internet & Network section.

image

Enable Screen Sharing, and click Computer Settings…, make sure to enable “VNC viewers may control screen with password: ********”, and to assign a strong password. This is what will actually allow you to connect to your Apple PC.

image

Go to System Preferences, then open Network, in the Internet & Network section.

image

Locate your IP Address, probably want to either the Ethernet one or the AirPort one. You’ll use this to find your Apple PC.

image

Windows PC

You’ll need to download a VNC client, I recommend TightVNC, it is free, proven, and I like how it works. After that just run your VNC client, use your Apple PC IP address from above, along with your password from above and your golden.

image


Sunday, July 27, 2008 4:11:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
image

Visual Studio allows developers to collapse code into regions, and so on. Sometimes this is helpful, sometimes not so much. But with the power of Visual Studio keyboard shortcuts we can make it less troublesome to manage this feature.

Here’s how:

Toggle Outlining Expansion

Ctrl + M, Ctrl + M

Note: The preceding image will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Sunday, July 27, 2008 3:55:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Saturday, July 26, 2008

imageIt does take long to have a ton of code on your hands, especially when you need to find something in a hurry. What can we do? Do we have a chance? How can we best find something in all of our solutions files?

Here’s how:

Find in Files

Ctrl + Shift + F

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Saturday, July 26, 2008 4:36:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Friday, July 25, 2008

image

So, how long is your task list? Do you have a ton of TODO’s? Did you know you can use Visual Studio to track your TODO’s in a task list? All you have to do is mark each TODO as follows:

// TODO: this is an example of something I really need to do

If you do this you can see your TODO’s in Visual Studio Task List dialog, which you can always pull up with the following keyboard shortcut:

View Task List

Ctrl + \, Ctrl + T

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Friday, July 25, 2008 4:33:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Thursday, July 24, 2008

Have you ever gotten code from someone or somewhere and you were not “thrilled” with how it was formatted. Was it just formatted wrong? Then the “Format Document” keyboard shortcut is for you! It will take the file you have open and format all the code until it is valid. Personally I wish their was a “Format Document for Chris Craft” keyboard shortcut because Visual Studio is a lot more forgiving than I am. But that’s okay it is still a life saver and you will love it one day when it just make the code better, all in one simple keyboard shortcut.

Format Document

Ctrl + K, Ctrl + D

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)

image


Thursday, July 24, 2008 4:36:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Wednesday, July 23, 2008
image

Screen real estate is always in short demand. Give us more monitors, give us bigger monitors. What would you say if you could have more screen real estate for coding with a single keyboard shortcut? You can, it is easy. All you have to do is the following:

Toggle Full Screen Mode

Shift + Alt + Enter

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Wednesday, July 23, 2008 6:17:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Tuesday, July 22, 2008
image

So is the event’s status Status.Cancelled or Status.Canceled? It is very possible one person will ask that it be changed to “Canceled” only to have another person ask to change it back to “Cancelled”. Instead of wrestling with the code or wearing our your “Find and Replace” feature, take advantage of one of Visual Studio’s features: The Rename Refactor. All you have to do is select an object and use its keyboard shortcut:

The Rename Refactor

Ctrl + R, R

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Tuesday, July 22, 2008 4:21:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Monday, July 21, 2008
image

How often do you want to move across one of your lines of code? Every day? Every hour? More? I’m sure it is often. And I hope you know and use this shortcut since it will save you lots of effort ever time you use it. Try it today, I bet you’ll love it.

Move Cursor One Word Right

Ctrl + Right Arrow

Move Cursor One Word Left

Ctrl + Left Arrow

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Monday, July 21, 2008 6:38:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Sunday, July 20, 2008

image

Let’s say you have a customer class. You know this class is used throughout your solution, but you aren’t sure exactly where it is being used. How can you quickly and easily find out this information?

All you have to do is use “Find All References”, either use the right-click menu item or even better use this keyboard shortcut:

Find All References

Shift + F12

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Sunday, July 20, 2008 12:30:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Saturday, July 19, 2008

image If you ever find yourself debugging a program by stepping through various classes, methods, and lines of code, the toggle breakpoint keyboard shortcut will be there to assist you. As you are stepping through the code and hit various breakpoints or potential breakpoints a simple single key press is all it takes to either add or remove that line of code from your list of breakpoints.

Toggle Breakpoint

F9

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Saturday, July 19, 2008 6:24:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Friday, July 18, 2008
image

Today’s tip is an interesting one. Do you know how to close an application window in Windows? Usually you can press Alt + F4. Visual Studio has similar feature, that comes in handy. The close current document keyboard shortcut works on most documents irregardless of whether they are in code view or design view. Quite useful and allows yours hands to spend more time on the keyboard and less time moving the mouse around everywhere.

Close Current Document

Ctrl + F4

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Friday, July 18, 2008 6:13:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Thursday, July 17, 2008
image

Solutions have more and more projects these days, and projects have more and more files. If you are working on a large enterprise level line of business application then you really might want to consider today’s Visual Studio keyboard shortcut. Admit it, you’ve probably added hundreds of file using the mouse and massaging various Visual Studio menus and toolbars. But after today you will probably have a new, better way of doing the same thing. How cool is that?

Add New Item to Project

Ctrl + Shift + A

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Thursday, July 17, 2008 6:46:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Wednesday, July 16, 2008
image

So everyday you possibly write hundreds, maybe thousands, of lines of code. Some of them are perfect, and will continue on to have a long productive life. Others however will be found wanting.

It it for these inadequate lines of code that the delete line keyboard shortcut was designed to deal with. And deal with it does. Instead of having to select a line, or multiple lines, you can simple use the delete line shortcut and wipe away the current line, or the currently selected lines.

Delete Line

Ctrl + L

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Wednesday, July 16, 2008 3:46:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [4]  |  Trackback
Tuesday, July 15, 2008

image

Visual Studio’s Object Browser is a powerful tool that can help developers to better “see” and understand their projects, and projects they may be working with.

Here’s what Visual Studio’s help says about it:

The Object Browser lets you select and examine the symbols available for use in projects. You can open the Object Browser from the View menu, or by clicking the Object Browser button on the main toolbar.

There are three panes: an Objects pane on the left, a Members pane on the upper right, and a Description pane on the lower right. If you resize the Object Browser into a single column, the Objects pane moves to the top, the Members pane to the middle, and the Description pane to the bottom.

View Object Browser

Ctrl + Alt + J

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Tuesday, July 15, 2008 11:21:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Monday, July 14, 2008
image

A great feature of Windows is the Alt + Tab navigator window. It allows user to quickly toggle between running applications. And Visual Studio has it’s equivalent of this Windows feature. This allows you to see and to navigate Active Tool Windows and Active Files. And you can see a thumbnail of the selected item.

 

Ctrl + Tab Navigator Window

Ctrl + Tab

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Monday, July 14, 2008 6:48:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Sunday, July 13, 2008

image

There is search, and then there is search. So in the beginning we had Quick Find: Ctrl + F. Quick Find worked fine, but wasn’t perfect. For one thing, Quick Find bring up a dialog that always automagically end up covering the most critical sections of your code, always. It has a LOT of options: where to look, match case, match whole word, search up, search hidden text, use regular expressions, and more. In other words, it is a bit unwieldy to use in simple day-to-day searches. I’m sure there are situations where people really need to have two-handed swords, but most of us are happy to make dinner with a simple kitchen knife.

That’s where the keyboard shortcut for incremental search comes in. It is great. No massive dialogs to get in the way. If you have already used Firefox’s incremental search feature then you are familiar with how easy and powerful this method is. If not, fire up Visual Studio now and give it a try. You have a real treat in store for you.

Incremental Search

Ctrl + I

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Sunday, July 13, 2008 6:39:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

imageI noticed today that Twitter has been very stable lately. Actually, I really hadn’t noticed any downtime in almost a week. I decided to check http://status.twitter.com/ and find out if this is true. From what I saw, there has only been 104 minutes of unscheduled down time in the first 11 days of July. That’s less than 10 minutes of downtime a day. Good job, guys!

Twitter really has a lot of potential to bring people together by making us more transparent to each other. For example, if you only know me from my blog, then there is a lot about me that you don’t know. Friend and family know me in some ways, and coworkers know me in some ways. Depending on what I decided to share on Twitter, my friends and family can learn a lot more about what I am working on at work, and my coworkers can learn a lot more about what is going on at home. All of this in easy to digest 140 maximum character messages.

My Twitter URL: @CJCraft

As much as I like what Twitter can do, it wasn’t long ago that I was become very irritated with the frequent “Twitter Blackouts” that were occurring on an almost daily basis. A lot of people were considering leaving Twitter, and the thought crossed my mind a couple times. I was really started to get frustrated with Twitter, and I wasn’t the only one:

imageWithout Twitter many people had to resort to drastic measures to fill the void. One poor soul even had to the leave the side of his computer, and actually build a real life version of the Twitter Fail Whale.

Others made online portals dedicated to the phenomena: http://failwhale.com/

And to top it off, you can even follow the Fail Whale on Twitter: @FailWhale 

 

Yeah, I “failed” for it too. I couldn’t resist, so I made a Twitter imagephoto mosaic that is composed from all the friends pictures of the top 100 most popular Twitter users. 

 

 

 

Resources I used in creating: Too Many Tweets: A Twitter Photo Mosaic.


cool | humor | personal
Sunday, July 13, 2008 4:45:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Saturday, July 12, 2008

imageIt is kind of funny how a feature that is easily argued as unnecessary and  superfluous can be a feature you find yourself using over and over. That’s exactly the kind of feature the Make Lowercase and Make Uppercase keyboard shortcuts are for Visual Studio. It might not be a feature you even use every day, but when you do finally end up needing this one it is such an incredibly useful feature.

Don’t believe me? How long would the following have taken to do by hand?

it is kind of funny how a feature that is easily argued as unnecessary and  superfluous can be a feature you find yourself using over and over. that’s exactly the kind of feature the make lowercase and make uppercase keyboard shortcuts are for visual studio. it might not be a feature you even use every day, but when you do finally end up needing this one it is such an incredibly useful feature.

IT IS KIND OF FUNNY HOW A FEATURE THAT IS EASILY ARGUED AS UNNECESSARY AND  SUPERFLUOUS CAN BE A FEATURE YOU FIND YOURSELF USING OVER AND OVER. THAT’S EXACTLY THE KIND OF FEATURE THE MAKE LOWERCASE AND MAKE UPPERCASE KEYBOARD SHORTCUTS ARE FOR VISUAL STUDIO. IT MIGHT NOT BE A FEATURE YOU EVEN USE EVERY DAY, BUT WHEN YOU DO FINALLY END UP NEEDING THIS ONE IT IS SUCH AN INCREDIBLY USEFUL FEATURE.

That’s the power of a good shortcut. Quick, simple, and powerful!

Make Lowercase

Ctrl + U

Make Uppercase

Ctrl + Shift + U

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Saturday, July 12, 2008 4:19:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Friday, July 11, 2008

image

Here’s another powerful tip. Almost every application has a UI, and these days most applications have a rich UI. Its a lot easier to work with an advanced UI in an UI design editor. But it’s a lot easier to do something in a code editor. So what’s a developer to do?

You can always tell a keyboard shortcut is powerful and important when it is given a single key.

Toggle Code / Design Views

F7

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Friday, July 11, 2008 4:28:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

image

This one is huge. You really need to learn this one, if you don’t already know and use it. Anytime you are working with code you, you will need to comment parts of and uncomment parts of it. It is just a part of a developer’s life. The mechanic will get his hands dirty, the carpenter will get splinters, and the developer will comment and uncomment code.

I guess the worst way you could comment and uncomment your code is to type it all by hand. Next worse would be to use the mouse and go to Edit menu, Advance menu item, then click Comment Selection or Uncomment Selection. Another option that is to use the Text Editor Toolbar (see below).

image

 

 

A little better I guess is to use the keyboard accelerator shortcut: Alt, then E, then V, then M for (Comment Selection), or E for (Uncomment Selection).

That’s four okay ways of comment and uncommenting your code, but what is the best way?

Comment Selection

Ctrl + K, Ctrl + C

Uncomment Selection

Ctrl + K, Ctrl + U

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Friday, July 11, 2008 1:52:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Wednesday, July 09, 2008
image

This Visual Studio window is so import it has two keyboard shortcuts. Can you guess what window it is? That’s right: it’s the Visual Studio Properties window.

So how many different ways can you come up with to open this window?

View Properties Window

    • Use the mouse and show / hide the window
    • Use the keyboard accelerators: Alt, then V, then W
    • Use the Design View keyboard shortcut: Alt + Enter
    • Use the keyboard shortcut: F4

Note: The image above will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Wednesday, July 09, 2008 7:20:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

imageMicrosoft Word has two “interesting” features. One feature is you can generate random text, for example, =rand(3) will generate three random paragraphs of text. The other feature is that Word allows you to make what I like to call “Vertical Block Selections”. See the following picture for an example of both.

Pretty cool, huh? And did you know you can make vertical block selections in Visual Studio? Here’s how:

Vertical Block Selection

Alt + Mouse

image

Note: The images above and to the right will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Wednesday, July 09, 2008 12:34:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Monday, July 07, 2008

image So a couple days ago we covered how to display line numbers:

31 Days of Visual Studio Tips & Tricks – Day 4: Display Line Numbers”.

So now how can we take this one step further. How about an easy way to go to a specific line of code? Think about how often as a developer you need to find a line in a large file of code. Sometimes you find out there is an error on a certain line of code and instead of scrolling down to this line manually you could use a special keyboard shortcut.

Go to Line

Ctrl + G

Definitely one of my favorite keyboard shortcuts for Visual Studio.

Note: The image to the right will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Monday, July 07, 2008 4:59:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Sunday, July 06, 2008

image Many times developers will find themselves working with an object, and wanting to know more information about how it is defined and designed.

For example, you are working with a Customer object and you want to look at the Customer.cs file and find out what the Customer object has to offer. What methods, properties, and events does it have for you to work with?

There are several ways for learn more about our Customer class. One you could use the Solution Explorer and manually locate the wanted Customer.cs file. This is a slow process and requires you to already know name and location of the class you want to review. Sometimes it may not be as simple as added a .cs extension the object.

Another approach would be to right click on Customer object and choose Go to Definition. This will take you there automatically, so it is much quicker. But there is an even faster way, and this is the way you wan to use:

Go to Definition
F12

This keyboard shortcut is so important that it is assigned to a function key. This requires only one key press.

Note: The image to the right will take you to a full size image if you want to see this in more detail.

Feedback:

If you have a favorite Visual Studio Tip or Trick be sure to share it in the comments. I’ll compile a list and post it for everyone once there are enough.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Sunday, July 06, 2008 1:51:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Saturday, July 05, 2008

image If you have used many Microsoft Office products you are probably familiar with the Clipboard Ring concept. Basically it allows the clipboard to contain multiple items, and when you use the keyboard shortcut you cycle back through previous items.

The Clipboard Ring is to a developer’s code what a Painter’s Palette is to the painter’s paint. It is a any easy way to access recently used items. This is a common need when writing code for any application. There are lots of times you are juggling two or three key pieces of code, and it is very nice to have quick access to them. It’s almost like having real-time IntelliSense.

Cycle Clipboard Ring

Cltr – Shift - V

Note: The image to the right will take you to a full size image if you want to see this in more detail.

Feedback:

Alright, we’ve a lot of new reader submitted tips! Thanks guys. I quite a bit behind in score now. I’ll have to come up with a way to weight the scores to give me a chance now.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Saturday, July 05, 2008 3:00:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback
Friday, July 04, 2008

It is Independence Day today in the US, and we’re in Washington, D.C. imageto see us some awesome fireworks!

Since today is July, 4th, and we are on Day 4 I figured it would be good to do a VSTT that dealt with numbers. The best one I know is how to display line numbers in Visual Studio:

Display Line Numbers:

Go to the Tools menu, then click on the Options… menu item. Find the Text Editor item in the list on the left. Then I recommend choosing All Languages. Next find and check the Line Numbers checkbox in the Display section on the right.

The image to the right will take you to a full size image if you want to see this in more detail.

Feedback:

Alright, we’ve more reader submitted tips.  Thanks guys. Yeah, we are now tied. score: Me 4 / Readers 4.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Friday, July 04, 2008 10:18:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback
Thursday, July 03, 2008

imageOne of the best features most Internet browsers have is the ability to navigate backwards, and forwards, through your history of Web site pages you have visited. Don’t you wish you had this feature in Visual Studio? Well, you do. Here’s how you do it.

One option is to go to Visual Studio’s View menu and choose either Navigate Forward or Navigate Backward. An even more handy method is to use the following keyboard shortcuts:

Ctrl + – and Ctrl + Shift + –.

One cool thing about the way Visual Studio does this is that it will navigate backwards through different parts of Visual Studio, everything from forms you’ve open to code you’ve worked, and more.

Feedback:

Alright, we’ve had one reader submitted tip.  Thanks D1eg0. So far I still have the lead. score: Me 3 / Readers 1.

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Thursday, July 03, 2008 3:34:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [4]  |  Trackback

Oh, the humanity! How I hate it when I get “The terminal server has exceeded the maximum number of allowed connections.”

image

Page Brooks and I were just talking about how it only happens to you when you are in a bit of a hurry, and need to get something done ASAP. You are allowed two remote terminal sessions.

The problem usually isn’t that there are too many people logged in. The problem is almost always that people disconnected from their without ending their session or logging out. So terminal services thinks the connection is still active, but just idle.

One option is to use the Computer Management Console, and choose Action, Connect to another computer…, Services and Applications, and then go to Terminal Services Manager and log off or disconnect the sessions.

I found out about a more powerful command line version that was able to work for me. I think the above didn’t work because our servers are virtualized.

  1. run the following from a command prompt: query session /server:servername
  2. Next run the following: reset session [ID] /server:servername

Ah, it just works. So much better now. Me and our servers are friends again.


Thursday, July 03, 2008 2:22:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

imageIt happens all the time. You’re working in Visual Studio, and you need to work with an object that is in a namespace you haven’t declared yet. For example, you need to create a WebRequest in the System.Net namespace.

You have a few choices, some easy and some hard: You could add a using or import statement at the top of the class file as in “using System.NET”. You could fully qualify the object as in “System.Net.WebRequest”. You could try to click that tiny, tiny little red rectangle that will open the Smart Tag. You could type “CTRL + SHIFT + F10”. Or you could take the easy road and simply enter “Ctrl + .”.

“Ctrl + .” Rocks! Try it, you’ll love it!

 

Feedback:

What is your favorite Visual Studio 2008 tip or trick? Tell us all about it in the comments section. I’m keeping score: Me 2 / Readers 0.

 

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Thursday, July 03, 2008 1:59:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback
Tuesday, July 01, 2008

image

With most things there are two ways to learn them: the easy way, and the hard way. Visual Studio 2008 is know exception. One option, the hard way, is to spend all of your precious time learning and memorizing hundreds of Visual Studio shortcut key combinations.

Quick, what is the shortcut to perform an incremental search, or to convert selected text to lower case, or to comment a selection of code? Everyone one of these has a handy shortcut key combination. Do you know them all? If not, did you know Visual Studio has a feature you can enable so that it will show you, or maybe I should say teach you, the shortcut keys for most commonly accessed menu and toolbar items?

It is called “Show shortcut keys in Screen Tips”. You have to enable “Show Screen Tips on toolbars” for this feature to work. Both items are located on the same screen for easy access.

Here’s what you need to do:

  • In Visual Studio go to Tools, and then Customize….
  • This will open the Customize dialog where you will now need to check both the “Show shortcut keys in Screen Tips” and “Show Screen Tips on toolbars” checkboxes.

From now on when you use Visual Studio it will display shortcut key combinations on menus and toolbar tooltips whenever you use them.

If you’ll click on the included image, you will see a larger more detailed screenshot of the areas discussed.

 

Feedback:

Do you have a favorite Visual Studio 2008 tip or trick? Then tell us all about it in the comments section. I’m keeping score: Me 1 / Readers 0. Don’t let your teammates down. :D

 

PowerPoint: 31 Days of Visual Studio 2008 Tips & Tricks.pptx (Note: PowerPoint is updated daily to include new items.)


Tuesday, July 01, 2008 10:42:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  |  Trackback

imageI’ve committed myself to taking the knowledge I have learned, over the years, and sharing it more with others. Last month I did 30 Days of .NET Windows Mobile Applications, and this month I intend to do 31 Days of Visual Studio 2008 Tips & Tricks.

The material will come from a presentation I have given many times at different code camps and user groups. One of the goals of the series is to start a “conversation” with my readers. I want to share some of my best tips and tricks for Visual Studio, and in return I hope you’ll share some of yours with us as well.

Another goal I have is for the information to be quick and easy to “digest” and as worthwhile as possible. Give me a few minutes every day this month, and I bet I’ll make a difference in how productive you are every day.

 

Here’s the introduction from my Visual Studio 2008 Tips & Tricks presentation to set the stage:

“Visual Studio .NET is filled with hundreds of features that make our lives as developers more efficient. The number of features that Visual Studio .NET contains is immense. The Visual Studio .NET Tips and Tricks presentation is a compilation of my favorite, and most popular, tips and tricks for this great IDE. Developers who are unaware of these timesaving features miss out on opportunities to increase their programming productivity and effectiveness. This Visual Studio .NET Tips and Tricks presentation is meant to explain how to use Visual Studio .NET more effectively.”


Tuesday, July 01, 2008 10:40:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  |  Trackback

Theme design by Jelle Druyts

Pick a theme: