Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Balloon won't pop

Posted on 2004-09-09
9
Medium Priority
?
942 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 500 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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 place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

963 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