PDA

Click to See Complete Forum and Search --> : C#Add form Button


{FPP}
Feb 19th, 2006, 10:30 AM
Ok, I htink using API would be the best way to do this, I just dont know how, and was hoping someone could help.

This is what i want to do:

Allow the user to minimize any application to the system tray, not just the form. For example, if the clicked a button it might minimize outlook to the system tray, then show an icon, and they can bring it back up, by clicking the icon.

Can that be done? Thanks.


Also, would it be possible to add a button to all the programs, and make that button mizimize that app to the systemtray?


-FPP

DNA7433
Feb 21st, 2006, 12:58 AM
Wow, thats a doozy. Anythings possible, and I've done bits and pieces that could be hacked together to accomplish this sort of thing. Are you really sure you want to do this?

{FPP}
Feb 22nd, 2006, 09:24 PM
Yes, I would really like to see what you have done :). Thanks

DNA7433
Feb 23rd, 2006, 04:49 PM
Keep in mind this code will have to be in C++ not C#.

How did you envision the user "clicking a button" to minimize the windows to the tray. Is there a program with a list of all the open windows that you can minimize?

Also, for the part with a button being added to every window, where did you envision that button being placed on the window?

jmcilhinney
Feb 23rd, 2006, 05:12 PM
I use a utility called PowerMenu that adds an item to the system menu of each window that allows you to minimise them to the tray. That's a lot less obtrusive than adding a button, and probably easier too.

{FPP}
Feb 23rd, 2006, 07:51 PM
Yea, somthing similar to power menu. though i may have trouble converting to C#. But ill give it a whirl.

DNA7433
Feb 23rd, 2006, 07:59 PM
You can't convert to C#. What happens is you have all other processes load a Win32 DLL you create into their address space and then you run your code to setup a context menu. It cannot be a managed DLL. You could control the whole thing from a program in C# but the meat of the code will be C++.

{FPP}
Feb 23rd, 2006, 08:39 PM
Cool. So, what do ya have?