RSS Log in
 

As I was running a macro to increase or decrease the text font size (see previous post), I noticed that the macro balloon kept on flashing in the system tray. The reason for this is that in Visual Studio 2008, a balloon tip is shown every time you run a macro, until you click on it 5 times that is. Thereafter it will be no longer visible. The problem is that your macro might be running too quickly, giving you no time to click on it. For some background on this and why it is behaving like this by design, read Stopping the “Click here balloon” by Craig Skibo.

macro_balloon  

While I sort of understand why the VS team did this, I actually don’t care much for this feature. So I thought I’ll disable it altogether. This is easily done by adding a new registry key (HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\DontShowMacrosBalloon) and setting its value to 6. Note that you will still see the spinning cassette icon in the system tray but this is a lot less intrusive.

Instead of doing this manually I wrote a macro to disable this feature as otherwise I’ll probably forget I ever done this.

' Suppresses the macros balloon.
Public Sub DontShowMacrosBalloon()
	Dim key As Microsoft.Win32.Registry Key
	Dim subKey As Microsoft.Win32.Registry Key

	key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\VisualStudio\9.0", True)
	If (Not key Is Nothing) Then
		subKey = IIf(key.OpenSubKey("DontShowMacrosBalloon") Is Nothing, key.CreateSubKey("DontShowMacrosBalloon"), key.OpenSubKey("DontShowMacrosBalloon"))
		key.SetValue("DontShowMacrosBalloon", "00000006", Microsoft.Win32.RegistryValueKind.DWord)
		subKey.Close()
		key.Close()
	End If
End Sub

Should you ever want to re-enable it, simply delete the registry key or run the macro below:

' Enables the macros balloon simply by deleting the key
Public Sub ShowMacrosBalloon()
	Dim key As Microsoft.Win32.RegistryKey

	key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\VisualStudio\9.0", True)
	If (Not key Is Nothing) Then
		key.DeleteValue("DontShowMacrosBalloon", False)
		key.Close()
	End If
End Sub

Warning
The macros above modify the Registry and therefore the usual precautions apply.


Comments are closed
© Copyright 2012 TheBooleanFrog Powered by: BlogEngine.NET|Credits|Subscribe via RSS

Follow

twitter linkedin linkedin rss

TheBooleanFrog

Programming sticky notes and other distractions...