Solved

Balloon won't pop

Posted on 2004-09-09
9
871 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
 

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now