Tips And Tricks

Invisible Task Manager menu bar and tabs.

image Today I was pair programming with one of my co-workers, and during the session he somehow made Task Manager tile,  menu bar, tabs, and status bar disappear.  At first, we had no clue how it happened and were forced to use Alt+F4 to close Windows Task Manager because close (x) button was gone with the title bar.  However, in a little while he did it again.  He was double clicking on the empty space in the top border.

You can try it yourself.  Just start Windows Task Manager and double click anywhere in the empty space in the top border.  Double click again to get the menu and tabs back.   If you are not sure where the top border is, just double click in the same place the cursor is located on the image that you see on the right.

If you know of other weird behaviors in Windows, please let me know.

Tips And Tricks, Visual Studio, VS2010 CTP

Copy & Paste is broken in Visual Studio 2010 CTP

I was astonished when I realized that copying & pasting a line in VS 2010 doesn’t works the same as in previous versions of Visual Studio.  I wasC_Key blogging more than a year ago about wonderful feature how to copy and paste in Visual Studio.

In previous versions you can copy a line by moving cursor anywhere on a line you want to copy and without selecting anything press Ctrl-C.  Then you can paste that  line anywhere by pressing Ctrl-V.  The line will be inserted above the line where the cursor is without breaking that line.

However, in VS 2010 CTP the same technique will not work despite that option to turn this feature on/off exists in Options dialog.  Just open this dialog by selecting Tools/Options and then select Text Editor/All Languages.  ‘Apply Cut or Copy commands to blank lines when there is no selection’ check box should be checked by default.


Actually in previous VS version I notice the same broken behavior with XAML files.

I really hope that Microsoft will make copy & paste work as before.  I’m so used to move line up or down with Ctrl-C and Ctrl-V keys.

kick it on

Tips And Tricks, Visual Studio, VS2005, VS2008

Incremental search in Visual Studio

When you’re writing code in VS environment, I bet that you often use Ctrl+F keystroke to display “Find and Replace” dialog box.

There’s a better way.  Next time you need to look for some text in your code, press Ctrl+I and start typing your search.  After the text is found, you can use F3 key to find a next occurrence.

As soon as you press Ctrl+I, you’ll see “Incremental Search:” labelIncrementalSearch on the left part of VS status bar.  Your search text will appear on the status bar as you type it.  If you mistype your search text, you can use Backspace key to correct wrong characters.

kick it on

.Net, Coding, ReSharper, Tips And Tricks, Visual Studio

Shortcut Key to Comment code in VS and SQL Server Management Studio

When we learn any programming language, one of the firsCtrl+Ct thing  we discover is the syntax how to comment our code.  Some of you probably already have been using this shortcut key for awhile.

Select multiple lines of code and press Ctrl+K,Ctrl+C, and you hard work is going to be ignored. To reverse just press Ctrl+K,Ctrl+U

These keystrokes will comment/uncomment your code only with line comment like // in C# or — in SQL.  I’m not aware how to comment code with block comment (/**/) without using a plug-in for VS.

One more thing.  If you need to comment/uncomment a single line, you don’t need to select the whole line.  Just move the cursor to any position on the line you want to comment, and let you fingers press the magic combination.

If you like me (there’s nothing wrong to be different from me) and use ReSharper, than you would like to use Ctrl+Alt+/ with line comment and Ctrl+Shift+/ with block comment.

kick it on

Tips And Tricks, Visual Studio

Jump between braces in Visual Studio.

search_BraceHave you ever scroll, scroll, scroll to find the beginning of if else  statement?  In this post I’m not going to tell you that long methods and classes are evil.  Instead, I want to share with you how to move fast between open and close braces.

Put your cursor before or after the brace (your choice) and then press Ctrl+]. It works with either curly or round braces.  From now on you don’t need to play Where’s Waldo? to find that brace.

I’ve been using this trick since Visual C++ 4.0. 

kick it on

Tips And Tricks

A faster way to lock your computer.

I’m probably the last one to learn this key combination to lock computer.  Before this week, I was locking my computer by pressing three-finger salute (Ctrl-Alt-Delete) to launch Windows Security dialog and then press Enter key in order to lock my computer.  Starting this week I’ll be pressing only Windows Key + L.

I figure by pressing Win+L I’m going to save half a second per each instance.  Let assume that I lock my computer 6 times a day.  It means I’ll save 3 seconds a day and this adds up to about 18 hours minutes a year.

kick it on

Tips And Tricks, Vista

Vista Start menu power button should Shut down.

First time I tried to Shut down my brand new Vista, I pressed the Windows key on my keyboard and then clicked on the power button.powerButton

However, it just put my PC in sleep mode.  After that I’ve never used this button again until today.  By exploring Advanced settings in Power Options, I realized that I can configure this power button.

The easiest way is to press your windows key on your keyboard powerStartButtonand start typing power.   You should see Power Options in your Programs list.

Click on Power Options and Select a power plan window should be displayed on your screen.

This is a window where you can select your power plan.  Under each plan you can see Change plan settings link.  You should click on this link in order to navigate to Edit Plan Settings window.


We are not there yet.  Click on Change advanced power settings link, and you’ll see Power Options window.

Almost there. In the list section of that window extend Power buttons and lid and then extend Start menu power button.  In Setting change from default Sleep option to Shut down one.


Press the OK button and you are finally done.  Now the power button is going to shut down Vista.

Also notice that before the power button was brown and now it’s reddish.


kick it on