http://my.opera.com/adelamro/blog/2008/06/30/using-nvidia-perfhud-from-within-visual-studio
NVidia has just recently released NVidia PerfHUD 6.0, an update of the extremely valuable and convenient tool for any serious Direct3D programmer. This tool alone is enough reason to make me not think twice before buying an NVidia card again on my next VGA upgrade. Oh, and another thing about Nvidia is that they have recently acquired Agia and accelerated physics has already become available on some Nvidia cards! The PhysX SDK is free too! NVidia Banzai
Here are some tips (or a description of how I do things) that might help you use this tool efficiently without problems while working in VS. I've posted some of this on GameDev.net and the NVidia developer forums, so some copy-pasting was used here.
Go to Tools->External Tools and choose Add then give it a good title "NVidia perfHUD". In the Command box, point it to the NVidia perfHUD exe (not your exe). You will want to pass your exe as an argument, so in the Arguments box enter $(TargetPath) (no quotes). You will also probably need to set the Initial Directory to $(TargetDir) or $(ProjectDir). Then, use the "Move Up" button to move the new tool to the top of the list. Click Ok.
Now, add it to the Debug toolbar (where it logically belongs). To do that, go to Tools->Customize... then from the Categories list (the list to the left) select Tools, then from the list to the right look for "External Command 1" (it's 1 because we moved NVidia PerfHUD to the top of the list earlier), then drag it and drop it on one of the visible toolbars (the Debug toolbar is the most reasonable choice).
At this point, you can click on the newly added toolbar item to launch NVidia perfHUD with your exe. But you will probably want to add a keyboard shortcut to it. To do that, go to Tools->Options, and from the left select Environment->Keyboard. Now, in the text box titled "Show commands containing:", enter ExternalCommand1. This will narrow down the list to one item (which is the one we need). Then give it an intuitive shortcut (I use Ctrl+Alt+N and select Global from the "Use new shortcut in:" combo).Then, to make it look nice, customize the toolbar button and give it an image instead of having its title displayed. I recommend you grab the icon from the NVidia PerfHUD exe, convert it to a bitmap and use that.