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. Transparent label Ctrl [modified]

Transparent label Ctrl [modified]

Scheduled Pinned Locked Moved C#
questionhelp
10 Posts 5 Posters 1 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.
  • I Offline
    I Offline
    Imtiaz Murtaza
    wrote on last edited by
    #1

    Dear friends, I placed an image on the form and on one corner of that image, i placed a label control. I am displaying current date on the label control. Problem is that the background color of the label is looking very ugly as it hides some portion of the image. I want to make the label control transpaent so that only text of the label remains visible and the image behind it not gets hidden. How can i do so ? Imtiaz

    M M 3 Replies Last reply
    0
    • I Imtiaz Murtaza

      Dear friends, I placed an image on the form and on one corner of that image, i placed a label control. I am displaying current date on the label control. Problem is that the background color of the label is looking very ugly as it hides some portion of the image. I want to make the label control transpaent so that only text of the label remains visible and the image behind it not gets hidden. How can i do so ? Imtiaz

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

      Hello, At System.Windows.Forms.Label BackgroundColor Property, its possible to set transparent I think. All the best, Martin

      M 1 Reply Last reply
      0
      • M Martin 0

        Hello, At System.Windows.Forms.Label BackgroundColor Property, its possible to set transparent I think. All the best, Martin

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

        Oops, Sorry, does not work on PictureBox. Martin

        1 Reply Last reply
        0
        • I Imtiaz Murtaza

          Dear friends, I placed an image on the form and on one corner of that image, i placed a label control. I am displaying current date on the label control. Problem is that the background color of the label is looking very ugly as it hides some portion of the image. I want to make the label control transpaent so that only text of the label remains visible and the image behind it not gets hidden. How can i do so ? Imtiaz

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

          Hello Again, You could use a Panel with his Background Image Property, and set the Label BackgroundColor to Transparent. I tried it. All the best, Martin

          I 1 Reply Last reply
          0
          • M Martin 0

            Hello Again, You could use a Panel with his Background Image Property, and set the Label BackgroundColor to Transparent. I tried it. All the best, Martin

            I Offline
            I Offline
            Imtiaz Murtaza
            wrote on last edited by
            #5

            If i use panel, then how do i display text on the panel. There is no 'Text' property associated with the panel ? Imtiaz

            E M V 3 Replies Last reply
            0
            • I Imtiaz Murtaza

              If i use panel, then how do i display text on the panel. There is no 'Text' property associated with the panel ? Imtiaz

              E Offline
              E Offline
              engsrini
              wrote on last edited by
              #6

              Use label or Use Group box instead

              1 Reply Last reply
              0
              • I Imtiaz Murtaza

                If i use panel, then how do i display text on the panel. There is no 'Text' property associated with the panel ? Imtiaz

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

                No, but what I meant, that you place your label over the panel. In this case, the transparence of the Label will work! All the best, Martin

                1 Reply Last reply
                0
                • I Imtiaz Murtaza

                  If i use panel, then how do i display text on the panel. There is no 'Text' property associated with the panel ? Imtiaz

                  V Offline
                  V Offline
                  Vivek Sivasamy
                  wrote on last edited by
                  #8

                  Set the opacity property of the lable to 0 .This will make the label transperent and will give u the required effect

                  I 1 Reply Last reply
                  0
                  • V Vivek Sivasamy

                    Set the opacity property of the lable to 0 .This will make the label transperent and will give u the required effect

                    I Offline
                    I Offline
                    Imtiaz Murtaza
                    wrote on last edited by
                    #9

                    Opcity property is related to Form and not controls. Plz correct me if i am worng. Imtiaz

                    1 Reply Last reply
                    0
                    • I Imtiaz Murtaza

                      Dear friends, I placed an image on the form and on one corner of that image, i placed a label control. I am displaying current date on the label control. Problem is that the background color of the label is looking very ugly as it hides some portion of the image. I want to make the label control transpaent so that only text of the label remains visible and the image behind it not gets hidden. How can i do so ? Imtiaz

                      M Offline
                      M Offline
                      mav northwind
                      wrote on last edited by
                      #10

                      Unfortunately, there's no built-in way to do this. You'll have to build your own control to get real transparency. One way to do this can be found here[^] or here[^] Regards, mav -- Black holes are the places where god divided by 0... -- modified at 14:16 Wednesday 19th July, 2006

                      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