Solved

program on trayd bar....

Posted on 1997-12-01
20
210 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
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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 100 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
add combobox item based on numbers 9 154
Delphi 2 69
Find and Replace Stream with 0s 8 69
Moving (cutting/pasting) controls in a TTabbedNotebook... 7 42
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 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