Stopping the “Click here balloon”

Visual Studio 2002 and 2003 had the ability to stop a macro from running by double-clicking the small “spinning cassette” in the system tray next to the clock. For example, suppose you had a macro like this:

 

    Sub NeverEndingMacro()

        Dim ver As String

        While (True)

            ver = DTE.Version

        End While

    End Sub

When you run this macro, it will run forever unless you either kill the vsaenv.exe process or if you double click the spinning cassette in the system tray. Great for when you write a macro like this one that seems harmless, goes horribly, horribly wrong.

 

The problem: Nobody knew about it. Everybody would see the animation, but they would not think that they could interact with it. Some people thought it was there only as a security feature to let you know if a macro was running without you knowing it.

 

The solution: A while back, I added code to show one of those Windows XP balloons on the animation to let you know that a macro is being run. When the macro ends, the balloon and the animation go away. Now you have a discoverable feature to get you out of a bad macro.

 

The new problem: First three or four times you see the balloon, you are notified and you learn about how to stop any errant macros. After 20, 30, 40 times, that balloon become this vile, hated, useless, piece of UI that everybody never wants to see again (I can easily run macros a couple hundred times a day – now you know why it can get on my nerves). But it can also cause UI movement that can be very distracting. Try setting the cassette icon to always be hidden. If you have multiple icons next to the clock, then you get that slide-in, slide-out portion of the task bar. When a hidden icon starts to display a balloon, that part of the tray will slide out causing the tray to twitch uncontrollably if you run the macro over and over.

 

The new solution: We thought about this for a while, and we could not decide on a way to fix it. Should it be yet another option in tools options among the 1000s of others? We could not hide the balloon after running a macro a specified number of times because if you were to run the macro above with the True changed to False, then the balloon would flash so quickly, you would not see what it read, and after running that macro a few times you would be over the threshold of how many times to show it.

 

Nobody could settle on one way of doing it, so this was one of those “I am just making the change, everybody deal with it” fixes (in fact, I don’t think anybody on the extensibility team even knows I made the change). If you click on the balloon, not the X on the top right of the balloon but on the text part of the balloon, 5 times it will stop showing. This is controlled with the registry value located at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ DontShowMacrosBalloon. You can even set this value to 6 and you will never see the balloon again.

Comments

  • Anonymous
    June 29, 2004
    Instead of balloon tip there could have been like:
    After starting VS cold, on first macro run, show balloon and tell about key to stop macro or whatever.

    On later macro runs, show animated notify tray icon when macro running, if you hover over this, it shows the tip about how to stop macros. If you click the icon, it shows checkbox to disable the animating icon either until next boot of computer or forever.

    Ok so that's pretty complex. But no big deal with C#. If you can give C# code to popup a simple system balloon, I'd love that. It requires too much interop, couldn't figure it all out when I tried ..

  • Anonymous
    June 29, 2004
    Ah, thanks to the new VS beta1 help, I found an article about the balloon, using interop. Great!

  • Anonymous
    June 29, 2004
    "If you click on the balloon, not the X on the top right of the balloon but on the text part of the balloon, 5 times it will stop showing"

    I guess we run on the same problem again: Nobody knew about it, unless they are told about it.

    What about putting a "Don't show this again" checkbox inside the balloon, so giving the user a frindlier way of choosing what he/she wants?


  • Anonymous
    June 30, 2004
    The comment has been removed

  • Anonymous
    July 24, 2004
    How about this: if the macro lasts more than 3 seconds, the message will be visible for as long as the macro is running, but if the macro lasts shorter than 3 seconds, make the message stay for 3 seconds anyway. That way you assure that people can read the message and get a chance to click on it. (This is important, because e.g. I run macros that last under a second, and clicking on the balloon at all, let alone on some specific area in it, is very hard. :)

    Now that you have that assured, you can start playing with how to turn it off. I suggest a "Click on balloon for options." as part of the message. Then if the user clicks, you can pop up a separate dialog asking "Do you ever want to see this again?". So you don't need to bend backwards trying to add checkboxes to balloons. ;)

    What do you think?

  • Anonymous
    May 06, 2006
    I've always loved editors with built in macro languages.  Once you have macro control of every facet...

  • Anonymous
    September 08, 2007
    Just a Suggestion but I would not have the popup at all unless you are in the Macro editor (where you are suposed to test you macros). Things like while on the surface are good ideas, ends up really causing trouble for the experienced coder that has a number of quick and dirty macros. (for Function headers and the like) Thank You

  • Anonymous
    September 08, 2007
    Just a Suggestion but I would not have the popup at all unless you are in the Macro editor (where you are suposed to test you macros). Things like while on the surface are good ideas, ends up really causing trouble for the experienced coder that has a number of quick and dirty macros. (for Function headers and the like) Thank You

  • Anonymous
    September 14, 2007
    Man is this thing ever annoying.  I use the ctrl-shift-r, ctrl-shift-p macro feature all the time, and the balloon doesn't come up long enough to read it, much less click on it.  Searching for the term 'macro balloon' in the microsoft help reveals nothing.  So we have an annoying piece of UI that can't be turned off, brilliant.  If I have to resort to google to find a page on the web that tells me how to deactivate this thing, to me that indicates that it is broken.   Just a suggestion - if you have to click on the balloon 5 times to make it go away, why not say that on the balloon?  That way the user might stand a chance of knowing what to do.  

  • Anonymous
    March 06, 2008
    The comment has been removed

  • Anonymous
    April 16, 2008
    Can I stop the "“spinning cassette” in the system tray next to the clock" from appearing?  For macros that run very quickly the flashing is anoying.

  • Anonymous
    August 22, 2008
    The comment has been removed

  • Anonymous
    March 11, 2009
    The comment has been removed

  • Anonymous
    January 04, 2011
    The tape recorder is cute, but it needs to die.