Solved

Balloon won't pop

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

 

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

Independent Software Vendors: 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

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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