I have a WinForms app that makes use of a few notify icons which show balloon tips in various scenarios.
I've noticed (as have others...in 2008) that the visual style of the balloon tip is different when the BalloonTipText
fits on a single line - it reverts to a style that I seem to remember from the days of Windows XP!
See below for a couple of examples...
The code that does this is no more complex than:
someNotifyIcon.BalloonTipIcon = ToolTipIcon.Info;
someNotifyIcon.BalloonTipTitle = "A balloon tip";
someNotifyIcon.BalloonTipText = "One or multiple lines of text";
someNotifyIcon.ShowBalloonTip(5000);
Without adding a second line, how can I ensure that the balloon tip always has the second style (square corners)?
Unfortunately the .NET wrapper for NotifyIcon and it's contained BalloonTip does not allow for this. Quite why it picks the old style for one line and the new style for more lines I don't know.
If you really need to achieve this, you need to show the balloon with the Win32 message, making sure to set the balloon style in
dwInfoFlags
in theNOTIFYICONDATA
structure. You can find more info here.It's a fair old faff though, especially considering I suspect most end users would never notice!