I have been plagued recently by a recurring problem with Visual Studio 2005.
When I attempt to exit Visual Studio, I receive the error "Visual Studio cannot shut down because a modal dialog is open" and I am not able to exit. The rub is that there is no modal dialog - close every visible window in VS, close all other apps, resize, move and minimize VS and I can find no dialogs, modal or otherwise. Some bit inside VS is set incorrectly convincing itself that a dialog has not yet been closed.
The only solution was to open Task Manager and kill Visual Studio.
I have automatic updates turned on so, if this is a bug, I expected it would have been fixed by now.
I found a number of posts and threads about this issue so it is not uncommon but nearly every post did not list a solution.
After some digging, I discovered a hotfix for this problem that is not included in the normal Windows updates.
You can read the details of the problem from Microsoft here http://support.microsoft.com/kb/936971 and you can download the hotfix here
One important point. Visual Studio must be closed before installing the hotfix so you may end up killing the process via Task Manager one last time.