Results 1 to 8 of 8

Thread: C#Add form Button

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    C#Add form Button

    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

  2. #2
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    Re: C#Add form Button

    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?
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Re: C#Add form Button

    Yes, I would really like to see what you have done . Thanks

  4. #4
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    Re: C#Add form Button

    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?
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: C#Add form Button

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Re: C#Add form Button

    Yea, somthing similar to power menu. though i may have trouble converting to C#. But ill give it a whirl.

  7. #7
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    Re: C#Add form Button

    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++.
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Re: C#Add form Button

    Cool. So, what do ya have?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width