Solved

Balloon won't pop

Posted on 2004-09-09
9
879 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
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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi TcxGrid group footer summary 3 273
Printing problem 2 94
HTML text in the body of an email (delphi code) 12 119
Delphi: sending SMS on android platform 1 21
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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