Solved

program on trayd bar....

Posted on 1997-12-01
20
207 Views
Last Modified: 2010-04-04
How i make one program run on tray with a icon (this tray is the place that have the whatch, protect-virus,... on windows 95). I know a program that make this with any program - traydminimizer, but i want do this only in delphi.
Another thing is that i want make a window that always will show like a status bar of microsoft office.
0
Comment
Question by:inhaempepo
  • 10
  • 10
20 Comments
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
trayd bar? Please explain more briefly.

Stay on Top : property FormStyle of Form : fsStayOnTop.

Have fun,
ZifNab;
0
 

Author Comment

by:inhaempepo
Comment Utility
Edited text of question
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Sorry for my bad english, but I still don't really know what you mean with traybar. Do you mean with this the taskbar? Bottom-right corner in Win95? If that what you mean, then perhaps this will help you further (UDDF-files):

Buttons in Win95 task bar

Can anyone tell me of a way or a component or whatever else that will allow
delphi 2 or 3 to place a button on the task bar much like what PowerDesk
2.0 Toolbar does.

Here are the code snipits to do just that!

// This needs to be in your public declarations @ the top of the pas file
procedure TForm1.IconCallBackMessage( var Mess : TMessage ); message WM_USER
+ 100;




procedure TForm1.FormCreate(Sender: TObject);
var
   nid : TNotifyIconData;
begin
     with nid do
     begin
           cbSize := SizeOf( TNotifyIconData );
           Wnd := Form1.Handle;
           uID := 1;
           uFlags := NIF_ICON or NIF_MESSAGE or NIF_TIP;
           uCallbackMessage := WM_USER + 100;
           hIcon := Application.Icon.Handle;
           szTip := 'This is the hint!';
     end;
     Shell_NotifyIcon( NIM_ADD, @nid );
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
var
   nid : TNotifyIconData;
begin
     with nid do
     begin
           cbSize := SizeOf( TNotifyIconData );
           Wnd := Form1.Handle;
           uID := 1;
           uFlags := NIF_ICON or NIF_MESSAGE or NIF_TIP;
           uCallbackMessage := WM_USER + 100;
           hIcon := Application.Icon.Handle;
           szTip := 'This is the hint!';
// All the above is probably not needed.
     end;
     Shell_NotifyIcon( NIM_DELETE, @nid );
end;

procedure TForm1.IconCallBackMessage( var Mess : TMessage );
var
   sEventLog : String;
begin
     case Mess.lParam of
// Do whatever you wish here. For example popup up a menu on a right click.
          WM_LBUTTONDBLCLK  : sEventLog := 'Left Double Click';
          WM_LBUTTONDOWN    : sEventLog := 'Left Down';
          WM_LBUTTONUP      : sEventLog := 'Left Up';
          WM_MBUTTONDBLCLK  : sEventLog := 'M Dbl';
          WM_MBUTTONDOWN    : sEventLog := 'M D';
          WM_MBUTTONUP      : sEventLog := 'M U';
          WM_MOUSEMOVE      : sEventLog :=  'movement';
          WM_MOUSEWHEEL     : sEventLog := 'Wheel';
          WM_RBUTTONDBLCLK  : sEventLog := 'r dbl';
          WM_RBUTTONDOWN    : sEventLog := 'r down';
          WM_RBUTTONUP      : sEventLog := 'r up';
     end;
end;

Have fun,
c.u. ZifNab;


0
 

Author Comment

by:inhaempepo
Comment Utility
i can´t run the application becouse
var  nid : TNotifyIconData; the compiler not know.... (i put this code in unit1.pas...)
my uses have classes... what i´m doing wrong???



0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
To make it very easy and quick for us (and it saves time!), you maybe can use freeware components, which already do all of this what you want? Good idea? I think so! Here are some :

http://SunSite.icm.edu.pl/delphi/ftp/d20free/appbar13.zip
>>>>>>>>>>> makes of application an application desktop toolbar!

http://SunSite.icm.edu.pl/delphi/ftp/d20free/iconbar.zip
>>>>>>>>>>> puts an icon into the taskbar!

Have fun,
c.u. ZifNab;
0
 

Author Comment

by:inhaempepo
Comment Utility
thank you for the answer...

in this site i have to make anything to make tins question answered???
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
Comment Utility
Now you can answer this question by grading it :

I normally always give comments to an answer (except if the answer is obvious). This way everybody can give an answer and the questionar can choose which comment he finds the best.

To make it very easy and quick for us (and it saves time!), you maybe can use freeware components, which already do all of this what you want? Good idea? I think so! Here are some :

                          http://SunSite.icm.edu.pl/delphi/ftp/d20free/appbar13.zip
>>>>>>>>>>> makes of application an application desktop toolbar!

                            http://SunSite.icm.edu.pl/delphi/ftp/d20free/iconbar.zip
>>>>>>>>>>> puts an icon into the taskbar!

Have fun,
c.u. ZifNab;

0
 

Author Comment

by:inhaempepo
Comment Utility
You are very good!!!

thank's....
0
 

Author Comment

by:inhaempepo
Comment Utility
You are very good!!!

thank's....
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Glad I could help.

Have fun making your program! And good luck with it.
c.u. ZifNab;

0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:inhaempepo
Comment Utility
TNotifyIconData
i don´t undesrtant what its this kind???
in these componentes the compiler don´t know and i can´t compile the library...
i think that i have to include some file in uses but i dont find in help what lib has this TNotifyIconData
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Hi inhaempepo,

You need ShellAPI. So this unit has to be in your uses clausule.

Hope this helps.

Regards,
ZifNab;
0
 

Author Comment

by:inhaempepo
Comment Utility
i try shellapi but don´t works....
TNotifyIconData  unknown identifier......
i try later read all codes of the components to try understand the commands....
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
I don't get it. TNotifyIconData is defined in ShellAPI.
You can see it for yourself in the source code delivered by
Delphi.
0
 

Author Comment

by:inhaempepo
Comment Utility
I am already with headache from being thinking of this subject. I already sought in the help and I didn't find anything on TNotifyIconData, on ShellAPI I found.  
Everything well. I will rest a little and later I think of the subject again.  
Please, if you could sends me an e-mail explaining as this site works. I didn't still understand right as the subject of the points.  
zmbotta@nutecnet.com.br  
thank you / /
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Hi inhaempepo,

Which version of delphi are you running? I'm using D2 and just compiled a small program using iconbar.zip. Everything worked fine. Had no problems at all!

Have fun,
c.u. ZifNab;


0
 

Author Comment

by:inhaempepo
Comment Utility
i´m using the delphi 1.0 (for 16bits)....
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Aha, that's the problem. Code's I gave you are for D2 or above. Don't think these things work on D1.
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Inhaempepo,

 Here are some components for 16bit, didn't look at them so
 I don't if source is included :

 ftp://delphiexchange.com/pub/free/trayicon.zip

 ( Allows Delphi 1.0 Application to use an Icon in the Windows95    System Tray, Requires Call32NT)

 ftp://delphiexchange.com/pub/free/ptask201.zip
 ftp://delphiexchange.com/pub/free/ptask.zip
 ftp://delphiexchange.com/pub/free/ptask11.zip
 ftp://delphiexchange.com/pub/free/ptask101.zip
  ( taskbar for Win3.x : maybe some usefull code)
                                     

 
0
 

Author Comment

by:inhaempepo
Comment Utility
very very tank´s....
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

8 Experts available now in Live!

Get 1:1 Help Now