Systray icons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • byteit101
    New Member
    • Mar 2009
    • 25

    Systray icons

    I am working on a program that is an explorer.exe like program, right now, I am working on the system tray icons. I have looked many places, but have not seem to have found an answer. All I need is the GDI Bitmap, for I am going to pass it to a C# application. Is this even possible?
  • Savage
    Recognized Expert Top Contributor
    • Feb 2007
    • 1759

    #2
    Originally posted by byteit101
    I am working on a program that is an explorer.exe like program, right now, I am working on the system tray icons. I have looked many places, but have not seem to have found an answer. All I need is the GDI Bitmap, for I am going to pass it to a C# application. Is this even possible?
    I'm not sure if I understood you well, could you please rephrase your question or give us some simple example of what are you trying to do?

    Comment

    • byteit101
      New Member
      • Mar 2009
      • 25

      #3
      I am making a taskbar/system tray application in C#, and need the GDI Bitmap for each of the system tray icons.

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        I believe that the system tray uses icons rather than bitmaps, well the WIN32 API did anyway.

        Just draw them and add them as resources to your program.

        Comment

        • byteit101
          New Member
          • Mar 2009
          • 25

          #5
          Originally posted by Banfa
          I believe that the system tray uses icons rather than bitmaps, well the WIN32 API did anyway.

          Just draw them and add them as resources to your program.
          You are misunderstandin g what I want to do, I want to get the Icons from the system tray, and create my own system tray. I already know how to make one appear, I want to get them.

          Comment

          • Savage
            Recognized Expert Top Contributor
            • Feb 2007
            • 1759

            #6
            You might want to check code of this sample program then ^^

            ,kind regards.

            NOTE:As you will probably see code is written in C++,but you should be able to use it in .NET projects by using PInvoke.

            Comment

            • byteit101
              New Member
              • Mar 2009
              • 25

              #7
              Originally posted by Savage
              You might want to check code of this sample program then ^^

              ,kind regards.

              NOTE:As you will probably see code is written in C++,but you should be able to use it in .NET projects by using PInvoke.
              Ah! Perfect!
              I am planning to write a Native and C++/CLI mixed dll, then referencing it in C#

              Comment

              • george666
                New Member
                • Jul 2008
                • 28

                #8
                Originally posted by Savage
                You might want to check code of this sample program then ^^
                This code is wrong.
                You must never hard code windows class names (!)
                (different for each OS and SP)
                And the method is also very bad (you must do explorer code injection..)

                Comment

                Working...