Archive for April, 2007

Organizing Windows and Multiple Monitors

Moving on with our series on productivity. This time around I want to talk about how I organize my windows and monitors. This goes back into what I said at some point: using Windows and any application running on it just as-is out-of-the-box is kind of like buying a car and driving it around without ever adjusting the rear-view mirrors, the driver’s seat, etc. When we’re driving a car, we have to adjust those things so to make sure we can see everything that’s important, while still concentrating on the road ahead of us.

I’ve been working with dual monitors for about 7 years now, and I simply can’t work on a single monitor setup without cursing the living hell out of me. Working with a single monitor feels very claustrophobic to me, and I hate it (even though I always run at 1600×1200 pixels). But it can get worse; for instance, when I’m doing presentations and have to not only run a single monitor, but also drop the resolution to 1024×768. I guess that’d be the same feeling of driving one of those gigantic trucks people drive in Texas in any of those cities in Europe that have some really narrow streets (I’ve never done it, but I could bet it feels the same).  🙂

Working with Visual Studio and Dual Monitors

So part of effectively using two monitors is to make sure we configure the applications to take advantage of it. I’ll concentrate on Visual Studio, since that’s where most of us developer hang out. By default, developer usually run VS something like this (even if running dual monitors!):

Have I said before how much I feel that is claustrophobic? 🙂

In such setup, one can’t really see the full form, and may be seeing windows that really aren’t relevant for the task to be accomplished (in the snapshot, that is to lay out a form). Then, the developer switches to "View Code" mode, and then sees something like this:

Great… now the toolbox doesn’t show anything useful, and so it doesn’t the Properties window. And, we can’t barely see the code, which is really what we’re currently interested in. Just for the record, if you press Shift+Alt+Enter, VS switches to "Full Screen" mode, which gets rid of all the windows in VS, and displays mostly the code editor window (I use this feature a LOT when I absolutely have to work with a single monitor – like when doing presentations).

How about we use that second monitor that’s hanging in there? Except for the code editor, most windows in VS are "dockable", such as the Solution Explorer, Properties, Output, etc. So why not move those out of the way, but still keeping them close for when you need them? The following snapshot shows how I set up my environment here:

On the left monitor, I keep the code/form editor and the toolbox (since I’m always going to the toolbox to drag and drop controls onto the form, right?). On the right monitor, I keep the "accessory" windows I use a frequently. This set up allows me to have as much focus as I can on the most important thing, which is whatever I’m working on the monitor to the left, but I still have a pretty easy access to stuff I use frequently, which I move to the monitor on the right.

Let’s expand a little that monitor on the right so that you can see what I normally hang in there:

  • Items 1 (Solution Explorer) and 2 (Class View) show what I use for navigation. Most of the time I use the Solution Explorer, but I quite often use the Class View as well, so I keep them tabbed there;
  • Item 3 is the Properties window, which I use not only to set properties on visual controls, but also to see properties on the item that’s currently selected on the Solution Explorer, such as the full path to the selected file, for example;
  • Item 4 shows the Metrics window. This window is part of DevExpress’ Refactor! Pro. It shows Code Metrics for the file currently being edited. I like this window being there because it helps me keeping an eye on the quality of the source code I’m sitting on, and if I see any visual indication of "code smells" (for instance, methods that are too long and/or too complex) I can consider refactoring it (or at least to make a note and come back to it later);
  • Item 5 is the Server Explorer. I use that one instead of going back and forth to SQL Management Studio. For instance, for simple things like checking out the structure of a table (columns, data types, etc.), the source code of a Stored Procedure, or even to just see the data within a table, the Server Explorer is much better than using the full-blown SQL Management Studio;
  • Item 6 shows the bottom part of the screen, where I put things such as the Output window, Task List, and Error List.

Switching Windows Layouts

There are cases when I want to run VS only in one monitor, even though I’m on a dual monitor setup. For instance, if I’m connecting remotely to my computer, dual monitors aren’t supported, so I want to switch my VS windows configuration to only fit one monitor (for the records, Windows Vista does support dual monitor through remote connection).

Another scenario is when I want to see both VS and, say, the web browser (because I’m looking up some info); in such scenario I don’t want the browser going away when I activate VS, so fitting VS in a single monitor is more appropriate.

In order to have a handy way of switching screen layouts, I’ve been using the hint described in this article. In a few words, it uses macros to restore windows layout settings, therefore, rearranging all the windows in VS as you’ve pre-defined. I’m going to exploring the same technique and set up some more optimized settings for a few more scenarios such as "working with WinForms", "working with source code", "working in test-driven development mode", "working in debugging mode", etc., and for each of those, have support for both single and dual monitor setups.

The Ultimate Hardware Setup!!

Even better than working with dual monitor, is to work with three monitors: one 30-inch widescreen in the middle, plus one screen on each side in "vertical mode":

 THAT is what I’m talking about!!!  🙂

1 Comment

What does your Start menu look like?

It always amuses me when I see somebody opening a Start menu -> All Programs that has like 3 or 4 columns. How can anybody find anything that way?

I usually create folders within my "All Programs" menu to organize things. For instance, since I install a bunch of things that are related to development, I always have a Development folder where I can find things like Visual Studio, SQL Management Studio, etc.

A good way to organize the Start menu is just by opening its structure in Windows Explorer, and do it as we do with any other folders and files. To get there, right-click the Start menu, and click Explore:

From there, just create your folders and move stuff around.

It’s really funny to me how I really try to keep my "virtual" desktop organized, but still manage to keep a mess on my physical desktop. Well, I suppose I work a lot more with the stuff that’s on my computer than I do with the stuff that’s sitting on my desk.  🙂

By the way, I know that Windows Vista has an improved Start menu, but since I’m sticking with Windows XP for now.  🙂

Leave a comment

Some things in Windows I found out recently

These are two things available in Windows that I just came to find out recently. The first one made me feel REALLY stupid for not knowing it at first, but then I shared it with many other experienced Windows users, and to my relief, they didn’t know about it either.  🙂

Renaming files sequentially

So, we download pictures from the digital camera to the computer, and all the pictures are named something like DSFC4543.JPG, DSFC4544.JPG, and so on. Every once in a while I want to rename all the pictures within a folder as in Vacation2007-01.JPG, Vacation2007-02.JPG, etc.

Until not long ago, I actually had a little program I wrote that’d take a folder, and a root name (such as "Vacation2007", and then it’d rename all the files sequentially.

One or two months ago I learned that one can go to Windows Explorer, hit Ctrl+A to select all files, then F2 (default key for "Rename"), and then type in the root name for the files, and finally hit enter; Windows takes care of renaming all the files sequentially. Ouch! How come I had never thought of that??

Speed up those animations!

Windows has those fancy animations when one opens menus (like the Start menu and its sub-menus). It looks nice for the beginner users, but it really gets in the way for somebody trying to be productive; you know, you’re trying to get to something as fast as possible, and as you navigate to the menus, it seems to take forever to see the options showing up.

Well, there’s a setting on the Windows Registry that can be changed to speed up that animation time. The setting is under HKEY_CURRENT_USER, Control Panel, Desktop, and then select "MenuShowDelay" on the right panel. By default, that is set to 400; I’ve dropped mine to 1. Now the menus are flying out when I hover over the options!

Note: you must reboot the machine in order to see the results of changing this setting.


Screen Capture

Keeping up with my series on productivity, I’ll talk a little about screen capture.

Not only developers, but many computer users need to take snapshots of their screens for many different reasons; in my case, I do it when I’m writing articles, blog posts, sending an image in an email to explain something to somebody or to report a bug, etc. I’ve seen people struggling when trying to do that just because they either don’t have the right tool for the job, or they don’t know a few helpful shortcuts.

Did you know about Alt+PrintScreen?

The Print Screen key in Windows is probably the one feature every user knows about; it takes a snapshot of the entire screen, spanning through any monitors connected to the computer. The snapshot goes to the clipboard, and the user can paste it anywhere. Of course, if the user has dual monitor, and all she wanted was to capture a little part of the screen, another tool, such as MS-Paint has to be used to crop the image. The same is true if the user wants to do some editing, like highlighting something on the image, or adding a little effect, etc.

What not a lot of people know, though, is that if all you want is a snapshot of the current (active) window, pressing Alt+PrintScreen will do just that.  🙂

Microsoft OneNote

OneNote is a great tool to keep, huh, notes. As part of notes, we usually need some screenshots, and OneNote has a feature for that. Hitting WindowsKey+S will activate OneNote’s "Screen Clipping" feature, which turns the screen into a "clipping" mode, where you can click and drag the mouse to select what portion of the screen you want to clip; the image will then go straight to a new note in OneNote.


SnagIt is my favorite tool for creating snapshots (I have been using it for over 4 or 5 years). It costs $39.95, which I think is a pretty decent price for what it gives me.

The tool can be set to take snapshots in a variety of ways, such as:

  • A region to file
  • A region to Clipboard
  • A window to file
  • A scrolling window (great to take snapshots of a web page, for instance)
  • An object on the screen
  • …and of course, the entire screen

It also has some more advanced options, such as a freehand region, a menu with time delay option, text from a window, all images from a web site, a DirectX application… and it can also record a video of the screen.

I also like the fact that we get a preview immediately after we took the snapshot, and on that preview we can do a lot of great quick edits on the image; we can highlight stuff, add "stamps", watermark, change the edges of the image, and a lot of other editing options are available. From the preview window, besides "finishing" the process and saving the image to disk, we can also do things like sending the image directly to an email message, or to somebody on IM (instant messaging), or send it to a specific program or catalog.

I can tell you SnagIt is one of the main tools I use to improve productivity; since I’m always doing a lot of screencapturing, when I do it, I want to do it as quickly as professionally as possible.

Oh, also, for those using Windows Live Writer to write their blogs, make sure you use Rick Strahl’s SnagIt Live Writer Plug-in; it allows you to take snapshots from within Live Writer using SnagIt, which will paste it right back in.

Do you know how to capture text on a MessageBox?

We’re always facing some nasty MessageBoxes that show us some error that has happened, and then we want to send that error message to somebody. What do we do? Well, we take a snapshot from it, since it’s not apparent how we could select only the text from within the MessageBox, copy it, and paste it somewhere.

So, what a LOT of people don’t know about, is that when the MessageBox is active, you can press Ctrl+C, and the text content of the MessageBox will go into the clipboard. For instance, if the following MessageBox is active and I press Ctrl+C and paste it somewhere, I get the text I’ve pasted right after the image:

Cannot find the aerasera.txt file.

Do you want to create a new file?
Yes No Cancel

C’mon, be honest, did you know that?  (Don’t feel bad if you did not know: it seems like 8 out of 10 Windows users don’t know it either).  🙂


Dallas Code Camp

I’m going to be speaking at the Dallas Code Camp this Saturday (April 21). My topics are:

  • Introduction to LINQ
  • Design Patterns in .NET

Code Camps are really cool, since they’re free of charge for the attendee, and they always have a great line-up of speakers and content.

If you’re going to be there, make sure to stop by and say hi.  🙂

Leave a comment

The Sysinternals tools

Following the series on "how to be more productive", the free tools available at are extremely handy. I’ll mention the ones I use more often.


This one is great for anybody who does presentations (either at conference, user groups, or even for internal meetings). Sometimes it’s hard for some people to really see what the presenter is focusing on the screen, either because the fonts are not big enough, or because the presenter is talking about something that’s on the top-right corner, and the attendee is looking somewhere on the screen. For sometime I’ve tried to use the Windows Magnifier tool, but never really liked it. So ZoomIt comes to the rescue.

ZoomIt runs on the background, and whenever the presenter wants to zoom into an area of the screen, the Alt+1 shortcut will "freeze" the screen and allow the user to drag the mouse around the zoomed screen. The mousewheel can be used to zoom in or out. 

The other feature of it that I love is the one that turns the mouse pointer into a pen, so that the user can draw on the screen. So, you can zoom in a specific area, then click on the screen, and start drawing on it (say, drawing a circle around the area you want attendees to focus, or something like that). And you don’t need to zoom in in order to use the pen; you can also press Alt+2, which turns the mouse pointer into a pen, and "freezes" the screen, so that you can draw on it. This is so much better than having the speaker point to the projected screen with his hands… usually the person’s arm is not long enough to reach what’s been shown, and if it’s a big room with 4 large screens, well, pointing to just one screen does not help people who aren’t close to it. Using a tool like ZoomIt improves a lot the attendee’s experience. I’ve been receiving great feedback from people that see me presentation using this little handy tool.


Process Explorer

I don’t know about you, but I don’t really like the Windows Task Manager. It usually does not give me enough information to troubleshoot problems I’m having. SysInternals’ Process Explorer is a great replacement for the Task Manager, since it gives you everything the Task Manager does, and a lot more.


Is shows the processes in a hierarchical way, so to make it easier to understand which process launch what. If the process running is a .NET assembly, it’s highlight in yellow, and you can quickly see things like how many appDomains, classes and assemblies are loaded.

Also, double-clicking on the file gives you a dialog with a lot more information, such as the .NET tab, which puts together information from the Performance Counters, so that you can see a lot more data about things like what’s loaded by the CLR, Garbage Collection activities, memory consumption, etc.

File Monitor

File Monitor does what the name implies: monitors files. You run it, set a filter on which files you want to watch (such as *.DLL), and the tool will keep listing any sort of access that occurs on files that fulfill the criteria defined.

This is great to troubleshoot a variety of problems. For instance, if you’re having security problems, you can check out what files were being accessed, and whether or not the operating system was able to open them. A few months back I was trying to run a .NET app, and I kept getting an error message that didn’t tell me a whole lot. After running File Monitor, I could see what was the last file being accessed before the application crashed, and that way I found out I forgot to deploy a third-party control with the app. 


This tool is great to see what programs runs when you start Windows. Every once in a while you open the Task Manager and see some files running that you have absolutely no idea what they are; for instance, TkBellExe. How can you figure out what they are, and get rid of them you can you don’t need it? Autoruns to the rescue.

The tool shows you everything that "auto runs" in your computer. You can then see that TkBellExe is the RealNetworks Scheduler, and like myself, decide to uncheck this file, so that it won’t start up automatically anymore.

When you uncheck a file, it’ll not be "uninstalled"; instead, it’s just moved to a separate folder on the Windows Registry, so that if you want to check it back in, you can always do that at any point in time.

There’s a lot more!

There is just a lot more on the website. Make sure you check it out and you’re very likely to find other little tools that can help you a lot. There is a great DNRTV episode on the subject, where Scott Hanselman walks you through a bunch of the tools. Check it out!!

Leave a comment

Making better use of the Windows Taskbar

For over 6 years now I have been setting up my Windows Taskbar in a very specific way to improve my productivity. Essentially, instead of using the Taskbar as it is after installing Windows, I twist things around to be one-click away from things I use a lot. If you already master the Toolbar, maybe you shouldn’t read this post. Since I’ve seen a lot of experienced users who don’t set things up like I do, I think some people out there will still benefit from this post.

For one thing, I don’t "auto-hide" my Taskbar; it is just a few pixels-height, and I prefer to take that room on the screen and don’t have to move the mouse to edge of the screen for it show up. This is what my Taskbar looks like:

As you can see, I resize it to make it occupy two rows. On the first row, I see the typical buttons that show what applications are open:

No surprises there. Another thing I have there is the Language Bar. Most of the time I’m typing text in English, but when I’m typing something in Portuguese, I need to get some special characters in, and for that I need to change my keyboard layout, so it’s handy to have the selector sitting right there:

On the second row of the Taskbar, I add a few more toolbars. In order to get more of the built-in toolbars, all you have to do is to right click on the Taskbar and go to the Toolbars option:

There you can see the ones I have selected on my box (well, I’ve got almost all of them).  🙂

This is how I use them. First, the Quick Launch toolbar:

This one is pretty popular. On mine, I always put things that I really use a lot, so I like to have those options always one-click away from my mouse pointer. If I notice that there is something I haven’t been using for a while, I’ll just delete it from the toolbar, to avoid getting it too cluttered, and therefore, making it become useless. Also, if I see myself going manually to options through the Start menu, or to specific folders in Windows Explorer, I’ll drag and drop the thing to the Quick Launch so to create a shortcut to it; and when I’m done using the thing, I’ll just remove it.

Next on my list is the Desktop toolbar. I use it to get quick access to anything that’s sitting on my desktop. That includes both shortcuts as well as things like My Documents, My Computer, etc. I use this a lot to navigate to places directly without having to open up Windows Explorer:

Next, the Address bar. This bar will open the associated application with whatever you type in there. So, if you type in a UNC path, it’ll open Windows Explorer and navigate to that path; if you type in the path to a .doc file, it’ll open the document in MS-Word; if you type in a URL, it’ll launch your default web browser and navigate to the path. You got the idea. So I use a lot copying the path from somewhere (like when I get the path to a file in Visual Studio, for instance), pasting it in the Address bar and hitting GO. Much, much quicker than painfully navigating to places through the Start menu or Windows Explorer. Also, the address bar keeps the history of the last things you’ve gone to, so that sure comes in handy as well.


Finally, the Windows Search Deskbar, to quickly search for something:

Notice I didn’t mention the Links toolbar. That toolbar lists the Links I have defined in Internet Explorer; I’ll probably be phasing it out of my options since I prefer SlickRun to launch URLs like that. To a certain extent, SlickRun also replaces the Address bar, even though I still like the Address bar’s option to display a dropdown with the history.

Notice that, in order to set up your Taskbar, it takes some trying, clicking on the handles to the toolbar and moving it around:

Once you’re done resign and setting up your bars, make sure to lock it, so that you don’t mess things up by accident (just right-click the Taskbar and select "Lock the Taskbar"):

Experiment, and see if that works for you too. 🙂