0

In Windows 7 64 bit, Visual Studio 2010 Express, C#, NET 2.0, Windows Forms, I have an option in a context menu that hides my application (or minimizes it) to an icon in the notification area. The notification icon is always visible, as the application does not appear in the taskbar.

this.WindowState = FormWindowState.Minimized;
this.notifyIcon.ShowBalloonTip(10000, Application.ProductName, "To restore ProgramName, left-click its icon. Or right-click for the menu.", ToolTipIcon.Info);

However, the message is display with more than 10 seconds delay. This is not good, because I want to inform the user immediately from where he can restore the program.

How can I solve this issue? Thank you.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
TechAurelian
  • 5,561
  • 5
  • 50
  • 65

1 Answers1

0

I assume you mean that when you minimise your application, there is more than 10 seconds delay before the balloon tip becomes visible?

I'm having problems replicating your error, and I've never had this problem in the past. The problem may not be with your code in this particular function, but maybe elsewhere? Are you handling a lot of operations in the SizeChanged event (or something along those lines)? Or perhaps you have a lot of other applications hogging resources in the notifications bar?

Sorry I can't be of much use, but more information may help weed out your problem :)

Kris Dunning
  • 127
  • 2
  • 9
  • Yes, after I minimize my main (and single) form (or I hide it using visible = false), it takes around 10 seconds until the balloon tip becomes visible. I don't handle SizeChanged event. The form doesn't have a border and it covers the entire screen. – TechAurelian Jan 27 '12 at 11:25
  • OK, I don't see why that would be giving a delayed response, and to hide the form, perhaps consider the Form.Hide() method instead? – Kris Dunning Jan 27 '12 at 11:32