When running Windows Live Messenger on Windows 7, it will not minimize to the tray icon. Setting the application to Windows Vista compatibility mode will make it work.
This workaround is well-described in many articles, e.g.
How does the compatibility mode change the behaviour of minimizing Windows Live Messenger? I assume that Windows Live Messenger doesn't check how it is configured so there must be something on the OS side doing this.