Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

program on trayd bar....

Posted on 1997-12-01
20
Medium Priority
?
217 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
[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
  • 10
  • 10
20 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1352527
trayd bar? Please explain more briefly.

Stay on Top : property FormStyle of Form : fsStayOnTop.

Have fun,
ZifNab;
0
 

Author Comment

by:inhaempepo
ID: 1352528
Edited text of question
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1352529
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:inhaempepo
ID: 1352530
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
ID: 1352531
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
ID: 1352532
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 400 total points
ID: 1352533
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
ID: 1352534
You are very good!!!

thank's....
0
 

Author Comment

by:inhaempepo
ID: 1352535
You are very good!!!

thank's....
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1352536
Glad I could help.

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

0
 

Author Comment

by:inhaempepo
ID: 1352537
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
ID: 1352538
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
ID: 1352539
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
ID: 1352540
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
ID: 1352541
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
ID: 1352542
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
ID: 1352543
i´m using the delphi 1.0 (for 16bits)....
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1352544
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
ID: 1352545
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
ID: 1352546
very very tank´s....
0

Featured Post

Industry Leaders: 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

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…
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…
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

610 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