Solved

Balloon won't pop

Posted on 2004-09-09
9
891 Views
Last Modified: 2010-04-16
I have a program that creates a balloon tip.  It works 100% in Windows 2000 but in Windows XP the balloon tip does not automatically dismiss itself after the timeout.

I even downloaded the latest cooltrayicon component and tried the demo of it and it too does not dismiss unless it is clicked on.  I have tried both my own program and cooltrayicon test program on other xp machines and both have the same problems.

Anyone know if there is something in XP that may be causing this problem or have any code sample that they know works on XP?
0
Comment
Question by:mantra246
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 4

Accepted Solution

by:
Evarest earned 125 total points
ID: 12016041
I managed to hide the balloon by using a separate TTimer. This timer will call TCoolTrayIcon.HideBalloonHint; to hide the balloon:

procedure TfrmMain1.tmrHideBalloon1Timer(Sender: TObject);
begin
 tmrHideBalloon1.Enabled :=false;
 trayIcon1.HideBalloonHint;
end;

and of course you need to set TTimer.Enabled := true somewhere:

procedure TfrmMain1.trayIcon1BalloonHintShow(Sender: TObject);
begin
 tmrHideBalloon1.Enabled :=true;
end;

Kind regards,
Evarest
0
 

Author Comment

by:mantra246
ID: 12016216
So i take it you had the same problem?
0
 
LVL 4

Expert Comment

by:Evarest
ID: 12016340
Yep,

it's probably the cooltrayicon that's the problem. I didn't look any further into it, as the problem could be solved this way...

You can also create the timer on the spot (fTimer :=TTimer.Create) if you don't want the extra (very small) resources if not needed :-)

Evarest
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mantra246
ID: 12016462
It's not just the cooltrayicon that is the problem - i've tried several code samples i found around the web and all have the same problem.

I've also now just noticed that the NIN_BALLOONTIMEOUT message is never send back in any code - my own, that found around the web or in cooltrayicon - even on win2k.

strange.
0
 
LVL 3

Assisted Solution

by:Sabre
Sabre earned 125 total points
ID: 12019256
Hi Mantra246 and Evarest

Just thought i'd add a point to this question:  

While the tray icon has the focus, the balloon tip will remain.  To solve the problem you will need to have the icon loose the focus.  It's a small quirk of Windows and i have noticed that cooltrayicon and others do not even make mention of this - well, remember where you saw it first :)

It might save having to implement timers, etc.  
0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 12023402
Have you tried the balloon component in this free component package?

http://homepages.borland.com/jedi/jvcl/

It work well for me in both operating systems

Regards,

Hypoviax
0
 
LVL 7

Expert Comment

by:DavidBirch2dotCom
ID: 12024121
Balloon won't pop,

A) jump on it!
b) get a sharper pin!
0
 
LVL 1

Expert Comment

by:mgazza
ID: 12092767
dont use a timer then

var
  count:cardinal;
  timeout:cardinal;
begin
  timeout:=5000;
  count:=gettickcount;

  repeat
    sleep(100)
    application.processmessages;
  until gettickcount>count+timeout;

call the pop
0
 

Author Comment

by:mantra246
ID: 12285914
Evarest - I used your idea of a timer and all seems to work as i wanted.

Sabre - Thanks for the tip.  I checked it out and you're right, in XP even a ballon displayed by windows will sit there till you dismiss it.  Odd way to do it but i guess it is Microsoft :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question