Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Trasparent panel

Trasparent panel

Scheduled Pinned Locked Moved C#
questioncsharp
9 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sujithkumarsl
    wrote on last edited by
    #1

    i am creating a C# application,the main form has a background image. i want to put another panel on top but it should be trasparent. i want to see the back ground image. how can i make the panel trasparent?

    My small attempt...

    A M A 3 Replies Last reply
    0
    • S sujithkumarsl

      i am creating a C# application,the main form has a background image. i want to put another panel on top but it should be trasparent. i want to see the back ground image. how can i make the panel trasparent?

      My small attempt...

      A Offline
      A Offline
      andre_swnpl
      wrote on last edited by
      #2

      Set the panel background color to transparent should do the trick

      S 2 Replies Last reply
      0
      • A andre_swnpl

        Set the panel background color to transparent should do the trick

        S Offline
        S Offline
        sujithkumarsl
        wrote on last edited by
        #3

        but i tried that. but i didnt work

        My small attempt...

        1 Reply Last reply
        0
        • A andre_swnpl

          Set the panel background color to transparent should do the trick

          S Offline
          S Offline
          sujithkumarsl
          wrote on last edited by
          #4

          i removed the panel and added the label but the samething happening i cant change it to transparent. there is an option in backcolour to set transparent but it shows a gray colour only

          My small attempt...

          1 Reply Last reply
          0
          • S sujithkumarsl

            i am creating a C# application,the main form has a background image. i want to put another panel on top but it should be trasparent. i want to see the back ground image. how can i make the panel trasparent?

            My small attempt...

            M Offline
            M Offline
            Martin 0
            wrote on last edited by
            #5

            Hello, I have made a little test project, where it works just fine with the transparent color set to the panel and label! I know that there a problems with transparency in multiple cases (TransparencyKey, Transparent Color, ...). If you search the web you will find a lot off peaple sharing the same problem. One hint could be, that there are some graphic cards (processors) who have problems with transparency in compination with 32 bit Color quality. So as a quick test you could set Color Quality to 16 bit. Hope it helps, Martin

            1 Reply Last reply
            0
            • S sujithkumarsl

              i am creating a C# application,the main form has a background image. i want to put another panel on top but it should be trasparent. i want to see the back ground image. how can i make the panel trasparent?

              My small attempt...

              A Offline
              A Offline
              AFSEKI
              wrote on last edited by
              #6

              Change the opacity value. If your Panel does not support Transparent background (try changing background color to transparent from the properties window ), then you should implement your custom panel using : this.SetStyle(ControlStyles.SupportsTransparentBackColor | Opaque, true); in your constructor. Then playing with the opacity value of your control, you can make it as much transparent as you want. Hope this helps...

              S 1 Reply Last reply
              0
              • A AFSEKI

                Change the opacity value. If your Panel does not support Transparent background (try changing background color to transparent from the properties window ), then you should implement your custom panel using : this.SetStyle(ControlStyles.SupportsTransparentBackColor | Opaque, true); in your constructor. Then playing with the opacity value of your control, you can make it as much transparent as you want. Hope this helps...

                S Offline
                S Offline
                sujithkumarsl
                wrote on last edited by
                #7

                both didnt work how can i chage the transparency with Opaque?

                My small attempt...

                B 1 Reply Last reply
                0
                • S sujithkumarsl

                  both didnt work how can i chage the transparency with Opaque?

                  My small attempt...

                  B Offline
                  B Offline
                  Blumen
                  wrote on last edited by
                  #8

                  Check this out: http://www.c-sharpcorner.com/UploadFile/ShrutiShrivastava/TransparentPanelinCSharp11232005015233AM/TransparentPanelinCSharp.aspx Alpha blending may also help. Blumen

                  S 1 Reply Last reply
                  0
                  • B Blumen

                    Check this out: http://www.c-sharpcorner.com/UploadFile/ShrutiShrivastava/TransparentPanelinCSharp11232005015233AM/TransparentPanelinCSharp.aspx Alpha blending may also help. Blumen

                    S Offline
                    S Offline
                    sujithkumarsl
                    wrote on last edited by
                    #9

                    its not showing the bacg ground image

                    My small attempt...

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups