Board index » delphi » showing hint

showing hint


2004-01-06 06:02:15 AM
delphi180
Hello,
my app is running in tray, and should show an hint when
good data is received.
any idea??
cu Casi.
 
 

Re:showing hint

IIRC it is Application.Hint or Application.Title you must set.. Please try
these.
Kind regards,
Nils Haeck
www.simdesign.nl
"casi" <XXXX@XXXXX.COM>writes
Quote
Hello,

my app is running in tray, and should show an hint when
good data is received.

any idea??

cu Casi.

 

Re:showing hint

hello nils,
I am trying this:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
application.Hint := 'test hint every 10 sec!';
end;
procedure TForm1.FormShow(Sender: TObject);
begin
application.ShowHint := True;
timer1.enabled := True;
end;
But nothing happend.
I am using D6.
cu Carsten.
Nils Haeck schrieb:
Quote
IIRC it is Application.Hint or Application.Title you must set.. Please try
these.

Kind regards,

Nils Haeck
www.simdesign.nl

"casi" <XXXX@XXXXX.COM>writes
news:3ff9ddca$XXXX@XXXXX.COM...

>Hello,
>
>my app is running in tray, and should show an hint when
>good data is received.
>
>any idea??
>
>cu Casi.
>



 

Re:showing hint

In article <3ff9ddca$XXXX@XXXXX.COM>, Casi writes:
Quote
my app is running in tray, and should show an hint when
good data is received.
any idea??
I see two options:
1) Set the trayicon hint via Shell_NotifyIcon
Var
nim: TNotifyIconData;
Begin
FillChar( nim, sizeof(nim),0 );
nim.cbSize := Sizeof(nim);
nim.Wnd := wnd;
nim.uID := ICONID;
nim.uFlags := NIF_TIP;
StrLCopy( nim.szTip, Pchar( NewTrayTooltip ),
Sizeof(nim.szTip)-1 );
Shell_NotifyIcon( NIM_MODIFY, @nim );
This way the user would see the tip text when he hovers the mouse over
the trayicon. It would not pop up on its own, however.
2) Create and show your own instance of THintWindow. That is the form
class the VCL uses for popup hints, you can use it yourself in code as
well. This way you control when, where, and how long the popup hint
appears. The standard hint support build into the VCL cannot be used in
your case since it only works when you have a visible form that is also
the active window.
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be
 

Re:showing hint

Actually, I looked up how I did it in one of my applications..
I used RxTrayIcon from the RxLib library (free), and set the "Hint"
property. Really simple :) You can either use this as well, or delve into
its source code to see how it is done.
sourceforge.net/projects/rxlib/
Kind regards,
Nils Haeck
www.simdesign.nl
"casi" <XXXX@XXXXX.COM>writes
Quote
hello nils,

I am trying this:

procedure TForm1.Timer1Timer(Sender: TObject);
begin
application.Hint := 'test hint every 10 sec!';
end;

procedure TForm1.FormShow(Sender: TObject);
begin
application.ShowHint := True;
timer1.enabled := True;
end;

But nothing happend.
I am using D6.

cu Carsten.
 

Re:showing hint

Quote
I see two options:
For Windows XP users you can also pop up a ballon hint. Shell_NotifyIcon was
extended accordingly. Use your favourite search engine, I am sure you find
how it is done. I have also seen a component (I think it is called
CoolTrayIcon) at www.torry.net with built-in ballon hint support.
Jens
 

Re:showing hint

Hello Peter,
thanks for your help.
Carsten.
Peter Below (TeamB) schrieb:
Quote
In article <3ff9ddca$XXXX@XXXXX.COM>, Casi writes:

>my app is running in tray, and should show an hint when
>good data is received.
>any idea??


I see two options:

1) Set the trayicon hint via Shell_NotifyIcon

Var
nim: TNotifyIconData;
Begin
FillChar( nim, sizeof(nim),0 );
nim.cbSize := Sizeof(nim);
nim.Wnd := wnd;
nim.uID := ICONID;
nim.uFlags := NIF_TIP;
StrLCopy( nim.szTip, Pchar( NewTrayTooltip ),
Sizeof(nim.szTip)-1 );
Shell_NotifyIcon( NIM_MODIFY, @nim );

This way the user would see the tip text when he hovers the mouse over
the trayicon. It would not pop up on its own, however.

2) Create and show your own instance of THintWindow. That is the form
class the VCL uses for popup hints, you can use it yourself in code as
well. This way you control when, where, and how long the popup hint
appears. The standard hint support build into the VCL cannot be used in
your case since it only works when you have a visible form that is also
the active window.

--
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be


 

Re:showing hint

Hi Nils,
thanks for your help.
Carsten.
Nils Haeck schrieb:
Quote
Actually, I looked up how I did it in one of my applications..

I used RxTrayIcon from the RxLib library (free), and set the "Hint"
property. Really simple :) You can either use this as well, or delve into
its source code to see how it is done.
sourceforge.net/projects/rxlib/

Kind regards,

Nils Haeck
www.simdesign.nl

"casi" <XXXX@XXXXX.COM>writes
news:3ffae0d9$XXXX@XXXXX.COM...

>hello nils,
>
>I am trying this:
>
>procedure TForm1.Timer1Timer(Sender: TObject);
>begin
>application.Hint := 'test hint every 10 sec!';
>end;
>
>procedure TForm1.FormShow(Sender: TObject);
>begin
>application.ShowHint := True;
>timer1.enabled := True;
>end;
>
>But nothing happend.
>I am using D6.
>
>cu Carsten.