Visual Studio Add-Ins: Explorer

My next find for a Visual Studio Add-In is called Explorer, and is another free one available from http://www.codeproject.com/csharp/Explorer.asp . Explorer is easy to install and use.

After you download, extract the two files to your My Documents/Visual Studio 2005/Addins directory (create the Addins directory if it doesn’t exist). Then launch Visual Studio, click on Tools, Add-in Manager, and make sure Explorer is loaded.

Using Explorer is quite simple, just right click on the Solution, Project, or a folder and you’ll see a new menu option, Explorer.

[Picture of Explorer Menu]

 Explorer has a submenu with two options, “Open folder” and “Execute this application”. Open folder opens up a windows explorer folder in the same directory where the item you clicked on resides. This is a very handy way to quickly navigate to the directory where your project resides.

Note the “Execute the application” option only appears when you are on a project, not the solution. However, this is handy when you have a test project that is not your main application. Using this menu option keeps you from having to go through the effort of changing your startup project to run a rest program that is part of your solution.

Be aware this does not build the project, it runs the last built exe you created. If you’ve made changes to the project you want to run be sure to do a build before using this menu option.

If you are interested in writing your own add-ins, you should also check out the available source code. It’s a nice example of how to hook into the menu structures for writing your own add-ins.

Command Prompt Explorer Bar

OK, I admit it. I’m an old time command line junkie. Starting out in the old DOS days I still find it faster to do some tasks by pulling up a command window and

This is a tool that’s been around for a while, but I find few people know about. Have you ever been in an explorer window and wished you had a command prompt that you could easily cut and paste between? Command Prompt Explorer Bar is your answer.

Available at http://www.codeproject.com/csharp/CommandBar.asp this tool has some cool features. After you install, open a new explorer window. Then hit Ctrl+M or select View, Explorer Bar, Command Prompt from the menu.

[Picture of Command Prompt Explorer Bar]

Down the left side are some handy short cut icons.

[Command Prompt Explorere Bars Shortcuts]

The top icon gives you the standard edit tools you’d have under a normal command window.

The second icon, the little green arrow, is the Synchronize command. If you’ve CD’d around, and want to quickly get back to the same folder as what are displaying in the upper half of the explorer window, just click the Synchronize tool.

The next tool, the one that looks like a blank window, is the CLS command. For those of you who are not a command line junkies, CLS stands for CLear Screen, and basically wipes the display.

The button with green text is the “Get selected items” button. If you highlight one or more files / folders in the upper half of the explorer window, pressing this button copies the file / folder names to the command line. Very useful for passing files to batch jobs.

The fifth icon down looks like a yellow bent arrow is the enter command. Clicking it is just the same as hitting the enter key on your keyboard.

The next item is the ESC key command, it’s the one with red text. Like the enter button, this is the same as pressing the escape key on the keyboard. A lot of older command line programs use escape to exit their program.

The seventh button is a menu that will paste in popular commands, such as “cd..”. Note that it has some shortcuts for .Net. However, this app was last updated in 2002, so don’t expect these to work with VS 2005. However the source code is available for download, so perhaps someone will update this feature.

The bottom two buttons will expand and contract the width of the command window.

There you go, a cool free tool to help out all us old command line addicts.

 

 

Elbow Room

On the 6th Doncha posted a WordPress blog (http://wordpress.com/blog/2006/12/06/running-out-of-space/) saying you could upgrade your WordPress account, and get up to 10 gig of storage space. The main question was, what could you do with all that space?

As a developer I’d love to have a space to place my projects. Whether it’s a small sample, or a complete application I’m giving out, it’d be nice to be able to host in a place I have control over.

Next, I’ve been experimenting with some software to do videocasts. A videocast is a capture of your screen as you work, with an accompanying audio track. I think it would be great to be able to take my blog to the next level, with extra material.

Finally, I love digital photography. Some of the high quality images though have pretty hefty file sizes. I’d love to have a gallery to display by best works.

That’s what I’d use 10 gig for. Elbow room.

Arcane Combinations: Multiple Monitors and VirtualPC

I really like Virtual PC, in that it lets me keep all of my development environments separated. I only have to load what I really need, and if my environment gets hosed it’s easy enough to rebuild or restore from a backup.

What I don’t like though, is that I lose my multiple monitor capability. I really like having the ability to drag my Visual Studio watches and other debugging windows into a second window. Fortunately, I’ve discovered an answer.

First, create a second virtual PC. This can be a bare bones system, I removed a lot of the extras like games and such prior to installing. I also run it using a minimal 256 meg of memory.

Now, go get yourself a copy of MaxiVista. I first blogged about this great product on August 30th of 2006: https://arcanecode.wordpress.com/2006/08/30/9/ . MaxiVista allows you to go over the network take over a second computer, and use it as a second monitor. Remember yesterday when I said to the network a Virtual PC looks just like a real one?

Install the MaxiVista server program in your main development Virtual PC. Now install the MaxiVista viewer program in the second virtual machine you just created.

Now there is a final, but very important step you need to take. Before you launch either Virtual PC, you need to go into the settings for each one. Go down to Mouse, then be sure to uncheck the box that says “Use Pointer Integration”. If you don’t do this for both virtual machines, none of this will work right.

Now you are ready to go, just launch both machines, and maximize each to full desktop and you’ll be using Virtual PC with multiple monitors!

A couple of things you should note. By turning off pointer integration you will not be able to simply drag your mouse outside the virtual pc to the host one. You will need to hit the right ALT key to release the mouse. Not a big deal, especially since the intention is to run in full screen mode, but something you should be aware of.

Also, this assumes you are running Windows and have a legal copy for each virtual machine you setup. If you have a limited number of copies of Windows, there is one other way to get it working.

I loaded Ubuntu Linux into a Virtual PC environment, then WINE, then the MaxiVista Viewer component. I actually got it to work as a secondary monitor, although MaxiVista’s remote control capabilities did not work. This isn’t something I use every day though, just tried as an experiment so your mileage may vary.

There you go, an arcane combination that will allow you to use multiple monitors with a Virtual PC!

Arcane Combinations: Virtual PC and Remote Desktop

Sometimes a useful tool becomes even more useful when combined with another. I call these “Arcane Combinations”. The first combo I’ll talk about is Virtual PC and Remote Desktop.

If you are not familiar with these, you should read my previous posts. Virtual PC can be found here https://arcanecode.wordpress.com/2006/09/20/virtual-computer-software/ and here: https://arcanecode.wordpress.com/2006/09/20/virtual-pc-step-by-step/. Remote Desktop can be found here: https://arcanecode.wordpress.com/2006/10/09/remote-desktop-connection/.

So how does this work? Well, to the network a virtual PC appears as a real computer. It has it’s own IP address, which is the key. Launch your virtual computer, and determine it’s IP address. This is pretty simple, but if you don’t know how just open a command window (Start, All Programs, Accessories, Command Prompt). Then type in IPCONFIG and press enter. You’ll see something like:

Ethernet adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Note if you have multiple network cards installed you’ll see multiple IP addresses, pick the one for the adapter you want to use.

Now on a remote computer, launch Remote Desktop, and key in the IP address given by your virtual PC. And boom, you will be remote controlling the virtual computer.

Now that you know how, I’m guessing you want to know why? Why remote the virtual computer instead of the real one?

Performance to begin with. In my testing I’ve found slightly better performance by controlling the virtual machine as opposed to controlling the host machine then trying to use the virtual computer in it. This is especially true in times where I was stuck using a dial up connection to VPN to work, and needed to remote control my computer at the office. Performance was much better by remoting directly to the virtual computer.

Next, it would allow multiple users to share the same computer. Launch two different Virtual PC sessions and allow each user to remote to it. At my company we have a standard XP build with some company components preloaded on it. We had two vendors come in for a week to do a little work, and they brought their nonstandard laptops with them. We only had one spare development PC, so we set it up with two virtual sessions and let each vendor remote to the virtual computers from their laptops so they could do their testing in our customized environment.

Some last words of wisdom, you will want your host computer (the one running Virtual PC) to be a hefty box, and good band width is helpful, although I have gotten it to work over a dial up connection.

Give it a try, and leave a comment if you find other scenarios where this arcane combination would be useful.

SharpKeys

Every so often you find yourself wishing you could remap your keyboard. Find a use for that oddball key you never hit. Or maybe you are on an older laptop and don’t have a Windows key. That’s where SharpKeys can come in handy.

Available at http://www.randyrants.com/sharpkeys/, SharpKeys easily lets you change one key into another. You can select the key from a list, or just type it on your keyboard. In this example, you can see where I’ve remapped my ` (backward single quote mark) to the Windows key.

[Picture of SharpKeys]

To add a new key simply click Add, then in the dialog that appears select the to and from keys from lists, or type them. When you’ve done all the remapping you want, be sure to click the Write to Registry button, then you can close. Editing and Deleting key mappings works similarly.

Be aware, in order for your remappings to take effect, you have to reboot your computer. Annoying, but understandable, and hopefully remapping your keyboard isn’t something you will do often.

When you need to though, it’s nice to know this handy and free utility is there for you.

AllSnap

While we are on the theme of tools that snap, I thought I’d introduce AllSnap. AllSnap is a handy utility that doesn’t have much to display graphically but is a real gem. If you have ever used WinAmp, you are familiar with it’s “Snap” feature. When you get WinAmp close to the edge of the screen, it automatically moves itself to the edge. 

AllSnap is a free tool that gives that functionality to ALL windows. Available at http://www.cs.utoronto.ca/~iheckman/allsnap/, it’s one of those tools you will quickly get addicted to. 

AllSnap puts an icon in your System Tray, through which you can access it’s settings window. Be sure to check this out, as you can adjust things like the number of pixels you get to the edge in order to trigger a snap, whether it snaps to just the edges or a vertical and horizontal center, and much more. 

I’ve installed AllSnap on all of my systems, and it’s made life in the windows world just a little nicer.

WinSnap

I had the need to capture some screen shots, and old Print Screen wasn’t cutting it. I was unable to capture the menus I needed for my documentation. A quick search found a tool so cool I just had to blog about it.

WinSnap, available at http://www.ntwind.com/software/winsnap.html has all sorts of features for doing screen captures. It will do rounded corners, allow you to capture in various color schemes, such as grayscale and sepia, and save in all the standard formats (jpg, gif, bmp, png, and tiff). You can also add watermarks, which is cool.

There are more options than I can cover here, most useful is the time delay feature. To capture an image you just click the new snapshot button. WinSnap hides itself, then after a user specified number of seconds it takes a screen capture. By default it is one second, you’ll probably want to bump it up so you have time to get your app like you want it. I’ve found five seconds to be a good default.

Rather than repeating what they already have on their site, I’ll just point you to the features page (http://www.ntwind.com/software/winsnap/feature-highlights.html).

Take a look, this tool will be valuable to anyone who has ever had to capture screen shots. And since it’s free, the price is perfect!

Arcane Searches

One of the things I really like about WordPress is that you can see the search engine terms that lead people to your site. In the lists I see some search terms that occur frequently. I thought it might be fun to take a guess at what the googlers were looking for, and take a stab at answering them.

exit full screen remote desktop

Move your mouse to the top, center of the display. A little yellow bar will scroll down, with the machine name. On the left is a push pin you can use to make it stick. On the right is the traditional Min / Max buttons you see on a window.

virtual pc exit full screen

Alt + Enter will exit full screen, but it has to be the Alt key on the right side of the keyboard. (This assumes you haven’t changed you hot key mappings).

command to close virtual pc

There’s several ways to close a virtual pc. The simplest, and best is to do a shutdown of what ever OS you are running. When the guest OS shuts down, the Virtual PC exits.

You can also select Action, Close on the menu, VPC will prompt you to see if you want to close and save state (sort of like Hibernate on a laptop) or exit and discard changes. If you are running a Windows OS, VPC will also give you the option to shut down. You can get the same prompt by clicking the X (cancel) button on the window your guest OS is running in.

eventtoaster

This is one that shows up a lot in my searches. Event toaster is part of the Visual Studio Enhancements Add-In from Microsoft. See my entry on November 15th (https://arcanecode.wordpress.com/2006/11/15/visual-studio-add-ins-ms-visual-studio-enhancements/ or http://shrinkster.com/kdt ) for more info.

virtual computer usb

Virtual PC does not support USB in either version 2004 or Server 2005. And, despite being the most asked for item in Virtual PC 2007, Microsoft still does not have any plans to include it in the next version.

VMWare, on the other hand does support USB. In the VMWare Server product, USB is not entered by default. You can add it, however by Editing the Virtual Machine Settings. In the dialog under Hardware click Add, and pick USB.

zone alarm remote desktop client

Another one that appears frequently, I’m guessing there’s a need to know how to get remote desktop to cooperate with Zone Alarm. Open the Zone Alarm settings panel, and click on Firewall. By default the Internet Zone Security is set to High. Drop this to Medium to get it to work with remote desktop. You will also need to go into Program Control and put checks for Remote Desktop Connection for all four columns.

defrag a single file

Use the SysInternals Contig tool. See https://arcanecode.wordpress.com/2006/11/06/sysinternals-contig/ for more info.

There’s a few of the top searches from my history, hopefully I’ve answered questions for a few of you out there!

Text Editors – UltraEdit

If you are willing to invest a few dollars, you can get the Cadillac of text editors: UltraEdit (http://www.ultraedit.com/). At forty dollars (US) this editor does everything. It can handle multiple files, has syntax highlighting, is totally customizable. You can create macros for repeated commands, and the coolest feature to me is the ability to edit columns of text. You can cut and paste columns, move them around, etc. Very handy when editing data files that are fixed length records.

Here’s an example shot, in it you can see I have two files loaded (see the two tabs, Program.CS and ReleaseNotes.xml). You can also see I have a column of text highlighted, the Application namespace.

[Picure of UltraEdit.]

There are far more options than I can document here, but I’ll list a few of my favorites.

  • You can open files from, and save them to an FTP site. Great for editing files located on your Unix/Linux servers.
  • You can configure UltraEdit to work with Visual Source Safe, checking files in and out.
  • You can modify the dictionary to add your own words to spell check for. Very handy when you work in an industry that has a lot of special syntax.
  • As previously mentioned, you can write macros to handle complex or repetitive tasks.
  • Search / Search and Replace can use both straight text and Regular Expressions. Additionally, there are some special characters to represent often uses characters. ^p for example represents a carriage return / line feed combo.
  • Has a Hex Mode.
  • The toolbars across the bottom allow you to insert commonly used HTML tags, great for doing those tweaks on your web pages. I’ve gotten to where I do a lot of maintenance to my wesites using UltraEdit.
  • Handles huge files with no problems. I once FTP Opened a 1.5 gig (yes GIG) log file. Because of the slow connection it took an hour and a half to open, but once it had it locally it literally zoomed through the file. I could go from the beginning to end in about a second. Like I said, big files, no problem.
  • The ability to edit (cut and paste) columns of text. This is a feature I haven’t seen in any other text editor in a long time.

UltraEdit is the one tool I use every day. It’s shareware, so go give it a try. You can use it for 45 days with no issues. I’d bet after you try it you’ll be so hooked you’ll happily shell out the forty bucks. I’ve been using it since version 4, and am a happy camper.

Standard disclaimer, I receive no financial considerations and have no business affiliation with IDM (who makes UltraEdit). I’m just a happy customer who loves the product.

Text Editors – Notepad2

As developers we frequently need to delve into a text file. Be it an XML file, looking at some HTML, or a quick look into a CS or VB file to grab a routine to paste into our current app. It always makes me wonder when I run across a programmer who settles for the less than mediocre notepad that comes with Windows.

A handy tool I found via Scott Hanselman’s site (http://www.hanselman.com/blog/) is Notepad2 (http://www.flos-freeware.ch/notepad2.html) is a freeware text editor. It has most of your standard text editing capabilities, with a few great features for developers. First and foremost is syntax highlighting. Here’s an example of an XML file loaded in Notepad2:

[Picture of Notepad2.]

Here’s another example with a C# app loaded:

[Notepad2 with CSharp loaded.]

Using the zoom buttons (the + and – in the toolbar) you can zoom the font easily, great for doing presentations.

[Notepad2 with big text.]

It also supports an alternate color scheme, for those who like the high contrast look:

[Notepad2 alernate color scheme.]

Notepad2 is highly customizable:

[Notepad2 Configuration screen.]

If you decide you really like Notepad2, you may wish to add it to your Right Click menu. Steve Clarke has a registry change you can make to add it, see his blog at http://steve.wedevelop.net/archives/000252.html.

Like the SysInternals tools, Noteapd2 requires no installation. I keep this tool along with the SysInternals tools on my USB thumb drive, to make it easy for me to edit files on computers. If you are still stuck with notepad, I high recommend you try out this FREE alternative!

SysInternals – Update – Microsoft Merger Complete

Since I began my posts on SysInternals, I’ve found they have now gone completely Microsoft. The SysInternals URL now redirects you to a Microsoft TechNet page, http://www.microsoft.com/technet/sysinternals/default.mspx. All of the tools seem to be there, with a few minor changes.

The Process Monitor (ProcMon) tool has been renamed to Process Explorer. Other than that, it still seems to have the same capabilities, and they’ve made sure it works on Vista and the 64 bit Windows platforms.

Update: Seems I got confused over tool names, Process Explorer was always Process Explorer and not ProcMon. That’s what I get for writing blog posts at 2 am. Except for getting names confused, all the other details I point out are still accurate, good tools well worth the look.  Oh, and ProcExp does work on the Vista (32 and 64 bit versions).

There’s a new tool called Process Monitor that replaces the older FileMon and RegMon tools (although both of them are still available). The new ProcMon seems to give much the same info in a unified user interface. I admit it is nice to have all the info in one screen.

Take a look over the tools and feel free to post comments below on how you feel about the new features and the Microsoft revamp of the tools.

SysInternals – ZoomIt

The last tool I am going to present in this series (although certainly not the last tool available from SysInternals) is called ZoomIt. Zoom it allows you to zoom in on certain areas of the screen with one quick hit of a hotkey. The hotkeys are configurable, as you can see in the options dialog below.

[Picture of ZoomIt Option Dialog]

Once you activate the zoom, you can use the up and down arrows to change the level of magnification. The ESC key will exit the zoom functionality. You can also use the Draw feature to Draw on the screen, great if you are doing a net meeting or demonstration and want to highlight something.

Primarily this utility comes in handy during demos and meetings, but I’ve also found it useful when working on images for my app and need to look at a detail or two. Also handy for documentation, I have used the Draw feature to draw on the screen, then used Print Screen to snag the image and send to someone, as in the example below.

[Demonstration of ZoomIt's Draw feature.]

So give it a try, drop me a comment and let me know what creative uses you come up with for this handy tool!

SysInternals – ProcExp

If there was one of these tools that would make you drool, then this would be it. ProcExp is a process explorer that gives you all sorts of details about the jobs running on your system. After running it the first time, right click on the column bars and pick “Select Columns”, then add a few more useful columns. The most useful of these would be Path, which shows the disk location the exe or dll launched from. Version is also useful, you may find more that have meaning for you.[Picture of ProcMon basic view.]

Next, select View, Show Lower Pane. Then select View, Lower Pane View, and pick DLLs. OK, now here’s something really cool, especially for you .Net developers. See the image above, there are two processes that are highlighted in yellow. The yellow (and these colors are customizeable) indicates this is a .Net application. You can see I have two .Net apps, RSSBandit and PaintDotNet. Click on one of the yellow bars (in this case I picked PaintDotNet). You’ll see the lower pane populate, as in the picture below.

[Pic of ProcMon with it's lower panel showing some useful information.]

What you are seeing is a long list of all the DLLs loaded by your app. Way cool huh? You can see all the dependencies needed by your (or someone elses) program. Cool, but there’s more! Double click on the app line (again, the yellow line with PaintDotNet).

[Pic of dialog showing more information about the application you clicked on.]

You can see a new dialog with detailed info about the program. You can kill off the program, or bring it to the foreground. There’s lots of tabs you can click on, I’ll highlight a couple of the most useful ones. Click on the Performance Graph tab.

[Picture: Try not to drool as you look at this useful graph.]

This produces graphs similar to the ones Task Manager gives you, only this is targeted at just this particular app. Great tool for monitoring your program, looking at memory usage, CPU usage, etc. The Performance tab gives you similar information, only in a textual view.

Now go click on the .Net tab. You can see a list of the AppDomains. Click on the drop down (shown below) and you can see a list of the various performance counters you can view.

[Picture: Your like a kid at Christmas as you look over all the stats you can dig out of your .Net app.]

Lots of great info in this area, below I’ve pasted the Memory stats, just to give you an idea.

[Picture: Shows you just how much memory your app really needs.]

There’s more info to be found here than I can describe in this brief blog post. Take some time, dive in and look around. This tool can really assist you in determining the impact your application will have on the target system.

SysInternals – Two Monitor Programs

Nov. 9th Update:Microsoft has completed the merger of SysInternals into it’s internal TechNet area. Along with that they’ve renamed the old Process Monitor to Process Explorer. They have a new Process Monitor tool that combines the functionality of the two tools I mention below. Both tools below are still available, but you should also take a look at the new Process Monitor to see if it will better suit your needs.


How many times have you watched your hard drive light flicker and wondered “What the heck is banging my hard disk?” Well FileMon will help you figure this out. FileMon simply displays all the applications that are accessing your drives.

[Picture of FileMon.]

As you can see in the sample above, you can monitor all the items that are reading and writing to your disks. You can use filters in case there’s a particular program or programs you are interested in. The filters are nice in that you can use either includes (I only want to see…) or excludes (I want to see everything but…). Additionally you can save the output to a log so you can analyze it later.

Along the same lines is RegMon. RegMon is a Registry Monitor that will give you info on what is accessing your registry. Like FileMon there are filters and logging capability.

[Picture of RegMon.]

Two great monitoring tools to help you with debugging, and like all the SysInternals tools, free for the taking.