can i make a label transparent?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bagstoper
    New Member
    • Feb 2007
    • 40

    can i make a label transparent?

    can i make a lable transparent?
  • bagstoper
    New Member
    • Feb 2007
    • 40

    #2
    yes i can make a lable transparent

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by bagstoper
      yes i can make a lable transparent
      It's good to know that. But do you know how? :)

      Comment

      • samycbe
        New Member
        • Feb 2007
        • 83

        #4
        just select the backstyle property. you can select transparent option there

        Comment

        • sukeshchand
          New Member
          • Jan 2007
          • 88

          #5
          Yessss But can i make a lable transparent in VB.net

          Comment

          • bagstoper
            New Member
            • Feb 2007
            • 40

            #6
            i don't know how to do anything in vb.net

            Comment

            • Killer42
              Recognized Expert Expert
              • Oct 2006
              • 8429

              #7
              Originally posted by sukeshchand
              Yessss But can i make a lable transparent in VB.net
              You should have said what version you were using. Have you browsed through the properties of the label in the documentation?

              Oh! I've just done a quick search of the web and come up with this. Hope it helps...
              Code:
              Label1.BackColor = Color.Transparent
              Please let us know whether this provides what you are looking for.

              Comment

              • billyboyhere
                New Member
                • Mar 2007
                • 1

                #8
                how can i make a label transparent the code below doesn't work for me ... can u help me out am using VB.NET 2003
                here is the code
                Me.lblTest.Back Color = System.Drawing. Color.Transpare nt

                Comment

                • vijaydiwakar
                  Contributor
                  • Feb 2007
                  • 579

                  #9
                  Originally posted by billyboyhere
                  how can i make a label transparent the code below doesn't work for me ... can u help me out am using VB.NET 2003
                  here is the code
                  Me.lblTest.Back Color = System.Drawing. Color.Transpare nt
                  what's the error

                  Comment

                  • SammyB
                    Recognized Expert Contributor
                    • Mar 2007
                    • 807

                    #10
                    Originally posted by billyboyhere
                    how can i make a label transparent the code below doesn't work for me ... can u help me out am using VB.NET 2003
                    here is the code
                    Me.lblTest.Back Color = System.Drawing. Color.Transpare nt
                    That's the correct code, but it only makes the label transparent to its container, i.e., the form or panel. If you are trying to add a transparent label to a PictureBox, then you will have to draw it yourself. However, a better solution is to remove the PictureBox and use a Panel control instead. Just set the backround image of the panel to the image, put the label into the panel, and set the label BackColor to transparent. HTH --Sam

                    Comment

                    • Corster
                      New Member
                      • Mar 2007
                      • 36

                      #11
                      Just type the colour code 16777215 into the BackColour property. ☺

                      Comment

                      • Killer42
                        Recognized Expert Expert
                        • Oct 2006
                        • 8429

                        #12
                        Originally posted by Corster
                        Just type the colour code 16777215 into the BackColour property. ☺
                        Isn't that just white?

                        Comment

                        • Killer42
                          Recognized Expert Expert
                          • Oct 2006
                          • 8429

                          #13
                          Originally posted by SammyB
                          ...only makes the label transparent to its container, i.e., the form or panel. If you are trying to add a transparent label to a PictureBox, then you will have to draw it yourself...
                          In VB6, the picturebox can be the container for the label, so this would work. Don't know how it works in Vb.Net, though.

                          Comment

                          • Corster
                            New Member
                            • Mar 2007
                            • 36

                            #14
                            In VB.Net, you will need to select transparent from web colours in the properties of the control.

                            Comment

                            • ashishkapoor2000
                              New Member
                              • Feb 2007
                              • 2

                              #15
                              If you have VB6 installed.

                              Just Create a small proj with transparent label. convert that to vb.net.

                              Copy that label and use it anywhere.

                              Comment

                              Working...