How to do a background for a label will be without color?










15















I want to add a label to my form , and I want it without any color- I want just it's text to be visible, I don't find this option in the label's properties, can anyone help me please?










share|improve this question



















  • 1





    Rather than the nonsense of Color.Transparent, might I humbly suggest you set the label's background to the same color as its container (the form, most likely)? Say, SystemColors.Control?

    – Cody Gray
    Jan 9 '11 at 14:29















15















I want to add a label to my form , and I want it without any color- I want just it's text to be visible, I don't find this option in the label's properties, can anyone help me please?










share|improve this question



















  • 1





    Rather than the nonsense of Color.Transparent, might I humbly suggest you set the label's background to the same color as its container (the form, most likely)? Say, SystemColors.Control?

    – Cody Gray
    Jan 9 '11 at 14:29













15












15








15


1






I want to add a label to my form , and I want it without any color- I want just it's text to be visible, I don't find this option in the label's properties, can anyone help me please?










share|improve this question
















I want to add a label to my form , and I want it without any color- I want just it's text to be visible, I don't find this option in the label's properties, can anyone help me please?







c# winforms






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 9 '11 at 13:58









Tasawer Khan

3,38963464




3,38963464










asked Jan 9 '11 at 13:49









ShiraShira

3162514




3162514







  • 1





    Rather than the nonsense of Color.Transparent, might I humbly suggest you set the label's background to the same color as its container (the form, most likely)? Say, SystemColors.Control?

    – Cody Gray
    Jan 9 '11 at 14:29












  • 1





    Rather than the nonsense of Color.Transparent, might I humbly suggest you set the label's background to the same color as its container (the form, most likely)? Say, SystemColors.Control?

    – Cody Gray
    Jan 9 '11 at 14:29







1




1





Rather than the nonsense of Color.Transparent, might I humbly suggest you set the label's background to the same color as its container (the form, most likely)? Say, SystemColors.Control?

– Cody Gray
Jan 9 '11 at 14:29





Rather than the nonsense of Color.Transparent, might I humbly suggest you set the label's background to the same color as its container (the form, most likely)? Say, SystemColors.Control?

– Cody Gray
Jan 9 '11 at 14:29












4 Answers
4






active

oldest

votes


















23














Do you want to make the label (except for the text) transparent? Windows Forms (I assume WinForms - is this true) doesn't really support transparency. The easiest way, sometimes, is Label's Backcolor to Transparent.



label1.BackColor = System.Drawing.Color.Transparent;


You will run into problems though, as WinForms really doesn't properly support transparency. Otherwise, see here:



http://www.doogal.co.uk/transparent.php



http://www.codeproject.com/KB/dotnet/transparent_controls_net.aspx



http://www.daniweb.com/code/snippet216425.html



Setting the parent of a usercontrol prevents it from being transparent



Good luck!






share|improve this answer




















  • 7





    Setting to "Transparent" doesn't work if the label overlaps something. (I wanted transparency because of overlap and just tried this. It didn't work.)

    – Eponymous
    Feb 10 '14 at 3:18












  • This is working for me (a label over PictureBox): stackoverflow.com/questions/9387267/…

    – Taras Kozubski
    Dec 10 '15 at 8:22






  • 2





    You have to set the label's Parent property to the object you're overlapping. At least if that object is a PictureBox; not sure about other controls. Try it and see.

    – Toolsmythe
    Jul 24 '18 at 0:23



















3














this.label1.BackColor = System.Drawing.Color.Transparent;





share|improve this answer























  • Good luck on expecting WinForms to handle transparencies properly ;) It is the same issue with WinForms Aero.

    – Machinarius
    Jan 9 '11 at 13:54






  • 6





    @Drknezz yeah, they shouldn't call something "transparent" that actually means "inherit the background color of the parent"... :)

    – Roman Starkov
    Jan 9 '11 at 13:59











  • @Drknezz: What is "WinForms Aero"? Is that what the cool kids are calling WPF nowadays?

    – Cody Gray
    Jan 9 '11 at 14:29











  • @Cody WPF isnt just thew kid on the block, it eases development a lot and integrates a lot more HW-Accelerated features than WinForms, Check it out. [BTW: Have you been hiding on a cave or sth?] @Romkyns +1 XD

    – Machinarius
    Jan 9 '11 at 15:55







  • 2





    @Cody I was referring to getting the Aero glass sheet effect on WinForms :p

    – Machinarius
    Jan 9 '11 at 16:04


















0














You are right. but here is the simplest way for making the back color of the label transparent
In the properties window of that label select Web.. In Web select Transparent
:)






share|improve this answer






























    0














    If you picture box in the background then use this:



    label1.Parent = pictureBox1;
    label1.BackColor = Color.Transparent;


    Put this code below InitializeComponent(); or in Form_Load Method.



    Ref: https://www.c-sharpcorner.com/blogs/how-to-make-a-transparent-label-over-a-picturebox1






    share|improve this answer






















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4639482%2fhow-to-do-a-background-for-a-label-will-be-without-color%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      23














      Do you want to make the label (except for the text) transparent? Windows Forms (I assume WinForms - is this true) doesn't really support transparency. The easiest way, sometimes, is Label's Backcolor to Transparent.



      label1.BackColor = System.Drawing.Color.Transparent;


      You will run into problems though, as WinForms really doesn't properly support transparency. Otherwise, see here:



      http://www.doogal.co.uk/transparent.php



      http://www.codeproject.com/KB/dotnet/transparent_controls_net.aspx



      http://www.daniweb.com/code/snippet216425.html



      Setting the parent of a usercontrol prevents it from being transparent



      Good luck!






      share|improve this answer




















      • 7





        Setting to "Transparent" doesn't work if the label overlaps something. (I wanted transparency because of overlap and just tried this. It didn't work.)

        – Eponymous
        Feb 10 '14 at 3:18












      • This is working for me (a label over PictureBox): stackoverflow.com/questions/9387267/…

        – Taras Kozubski
        Dec 10 '15 at 8:22






      • 2





        You have to set the label's Parent property to the object you're overlapping. At least if that object is a PictureBox; not sure about other controls. Try it and see.

        – Toolsmythe
        Jul 24 '18 at 0:23
















      23














      Do you want to make the label (except for the text) transparent? Windows Forms (I assume WinForms - is this true) doesn't really support transparency. The easiest way, sometimes, is Label's Backcolor to Transparent.



      label1.BackColor = System.Drawing.Color.Transparent;


      You will run into problems though, as WinForms really doesn't properly support transparency. Otherwise, see here:



      http://www.doogal.co.uk/transparent.php



      http://www.codeproject.com/KB/dotnet/transparent_controls_net.aspx



      http://www.daniweb.com/code/snippet216425.html



      Setting the parent of a usercontrol prevents it from being transparent



      Good luck!






      share|improve this answer




















      • 7





        Setting to "Transparent" doesn't work if the label overlaps something. (I wanted transparency because of overlap and just tried this. It didn't work.)

        – Eponymous
        Feb 10 '14 at 3:18












      • This is working for me (a label over PictureBox): stackoverflow.com/questions/9387267/…

        – Taras Kozubski
        Dec 10 '15 at 8:22






      • 2





        You have to set the label's Parent property to the object you're overlapping. At least if that object is a PictureBox; not sure about other controls. Try it and see.

        – Toolsmythe
        Jul 24 '18 at 0:23














      23












      23








      23







      Do you want to make the label (except for the text) transparent? Windows Forms (I assume WinForms - is this true) doesn't really support transparency. The easiest way, sometimes, is Label's Backcolor to Transparent.



      label1.BackColor = System.Drawing.Color.Transparent;


      You will run into problems though, as WinForms really doesn't properly support transparency. Otherwise, see here:



      http://www.doogal.co.uk/transparent.php



      http://www.codeproject.com/KB/dotnet/transparent_controls_net.aspx



      http://www.daniweb.com/code/snippet216425.html



      Setting the parent of a usercontrol prevents it from being transparent



      Good luck!






      share|improve this answer















      Do you want to make the label (except for the text) transparent? Windows Forms (I assume WinForms - is this true) doesn't really support transparency. The easiest way, sometimes, is Label's Backcolor to Transparent.



      label1.BackColor = System.Drawing.Color.Transparent;


      You will run into problems though, as WinForms really doesn't properly support transparency. Otherwise, see here:



      http://www.doogal.co.uk/transparent.php



      http://www.codeproject.com/KB/dotnet/transparent_controls_net.aspx



      http://www.daniweb.com/code/snippet216425.html



      Setting the parent of a usercontrol prevents it from being transparent



      Good luck!







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited May 23 '17 at 12:02









      Community

      11




      11










      answered Jan 9 '11 at 13:52









      niemironiemiro

      1,03911333




      1,03911333







      • 7





        Setting to "Transparent" doesn't work if the label overlaps something. (I wanted transparency because of overlap and just tried this. It didn't work.)

        – Eponymous
        Feb 10 '14 at 3:18












      • This is working for me (a label over PictureBox): stackoverflow.com/questions/9387267/…

        – Taras Kozubski
        Dec 10 '15 at 8:22






      • 2





        You have to set the label's Parent property to the object you're overlapping. At least if that object is a PictureBox; not sure about other controls. Try it and see.

        – Toolsmythe
        Jul 24 '18 at 0:23













      • 7





        Setting to "Transparent" doesn't work if the label overlaps something. (I wanted transparency because of overlap and just tried this. It didn't work.)

        – Eponymous
        Feb 10 '14 at 3:18












      • This is working for me (a label over PictureBox): stackoverflow.com/questions/9387267/…

        – Taras Kozubski
        Dec 10 '15 at 8:22






      • 2





        You have to set the label's Parent property to the object you're overlapping. At least if that object is a PictureBox; not sure about other controls. Try it and see.

        – Toolsmythe
        Jul 24 '18 at 0:23








      7




      7





      Setting to "Transparent" doesn't work if the label overlaps something. (I wanted transparency because of overlap and just tried this. It didn't work.)

      – Eponymous
      Feb 10 '14 at 3:18






      Setting to "Transparent" doesn't work if the label overlaps something. (I wanted transparency because of overlap and just tried this. It didn't work.)

      – Eponymous
      Feb 10 '14 at 3:18














      This is working for me (a label over PictureBox): stackoverflow.com/questions/9387267/…

      – Taras Kozubski
      Dec 10 '15 at 8:22





      This is working for me (a label over PictureBox): stackoverflow.com/questions/9387267/…

      – Taras Kozubski
      Dec 10 '15 at 8:22




      2




      2





      You have to set the label's Parent property to the object you're overlapping. At least if that object is a PictureBox; not sure about other controls. Try it and see.

      – Toolsmythe
      Jul 24 '18 at 0:23






      You have to set the label's Parent property to the object you're overlapping. At least if that object is a PictureBox; not sure about other controls. Try it and see.

      – Toolsmythe
      Jul 24 '18 at 0:23














      3














      this.label1.BackColor = System.Drawing.Color.Transparent;





      share|improve this answer























      • Good luck on expecting WinForms to handle transparencies properly ;) It is the same issue with WinForms Aero.

        – Machinarius
        Jan 9 '11 at 13:54






      • 6





        @Drknezz yeah, they shouldn't call something "transparent" that actually means "inherit the background color of the parent"... :)

        – Roman Starkov
        Jan 9 '11 at 13:59











      • @Drknezz: What is "WinForms Aero"? Is that what the cool kids are calling WPF nowadays?

        – Cody Gray
        Jan 9 '11 at 14:29











      • @Cody WPF isnt just thew kid on the block, it eases development a lot and integrates a lot more HW-Accelerated features than WinForms, Check it out. [BTW: Have you been hiding on a cave or sth?] @Romkyns +1 XD

        – Machinarius
        Jan 9 '11 at 15:55







      • 2





        @Cody I was referring to getting the Aero glass sheet effect on WinForms :p

        – Machinarius
        Jan 9 '11 at 16:04















      3














      this.label1.BackColor = System.Drawing.Color.Transparent;





      share|improve this answer























      • Good luck on expecting WinForms to handle transparencies properly ;) It is the same issue with WinForms Aero.

        – Machinarius
        Jan 9 '11 at 13:54






      • 6





        @Drknezz yeah, they shouldn't call something "transparent" that actually means "inherit the background color of the parent"... :)

        – Roman Starkov
        Jan 9 '11 at 13:59











      • @Drknezz: What is "WinForms Aero"? Is that what the cool kids are calling WPF nowadays?

        – Cody Gray
        Jan 9 '11 at 14:29











      • @Cody WPF isnt just thew kid on the block, it eases development a lot and integrates a lot more HW-Accelerated features than WinForms, Check it out. [BTW: Have you been hiding on a cave or sth?] @Romkyns +1 XD

        – Machinarius
        Jan 9 '11 at 15:55







      • 2





        @Cody I was referring to getting the Aero glass sheet effect on WinForms :p

        – Machinarius
        Jan 9 '11 at 16:04













      3












      3








      3







      this.label1.BackColor = System.Drawing.Color.Transparent;





      share|improve this answer













      this.label1.BackColor = System.Drawing.Color.Transparent;






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Jan 9 '11 at 13:51









      PabucPabuc

      3,60362948




      3,60362948












      • Good luck on expecting WinForms to handle transparencies properly ;) It is the same issue with WinForms Aero.

        – Machinarius
        Jan 9 '11 at 13:54






      • 6





        @Drknezz yeah, they shouldn't call something "transparent" that actually means "inherit the background color of the parent"... :)

        – Roman Starkov
        Jan 9 '11 at 13:59











      • @Drknezz: What is "WinForms Aero"? Is that what the cool kids are calling WPF nowadays?

        – Cody Gray
        Jan 9 '11 at 14:29











      • @Cody WPF isnt just thew kid on the block, it eases development a lot and integrates a lot more HW-Accelerated features than WinForms, Check it out. [BTW: Have you been hiding on a cave or sth?] @Romkyns +1 XD

        – Machinarius
        Jan 9 '11 at 15:55







      • 2





        @Cody I was referring to getting the Aero glass sheet effect on WinForms :p

        – Machinarius
        Jan 9 '11 at 16:04

















      • Good luck on expecting WinForms to handle transparencies properly ;) It is the same issue with WinForms Aero.

        – Machinarius
        Jan 9 '11 at 13:54






      • 6





        @Drknezz yeah, they shouldn't call something "transparent" that actually means "inherit the background color of the parent"... :)

        – Roman Starkov
        Jan 9 '11 at 13:59











      • @Drknezz: What is "WinForms Aero"? Is that what the cool kids are calling WPF nowadays?

        – Cody Gray
        Jan 9 '11 at 14:29











      • @Cody WPF isnt just thew kid on the block, it eases development a lot and integrates a lot more HW-Accelerated features than WinForms, Check it out. [BTW: Have you been hiding on a cave or sth?] @Romkyns +1 XD

        – Machinarius
        Jan 9 '11 at 15:55







      • 2





        @Cody I was referring to getting the Aero glass sheet effect on WinForms :p

        – Machinarius
        Jan 9 '11 at 16:04
















      Good luck on expecting WinForms to handle transparencies properly ;) It is the same issue with WinForms Aero.

      – Machinarius
      Jan 9 '11 at 13:54





      Good luck on expecting WinForms to handle transparencies properly ;) It is the same issue with WinForms Aero.

      – Machinarius
      Jan 9 '11 at 13:54




      6




      6





      @Drknezz yeah, they shouldn't call something "transparent" that actually means "inherit the background color of the parent"... :)

      – Roman Starkov
      Jan 9 '11 at 13:59





      @Drknezz yeah, they shouldn't call something "transparent" that actually means "inherit the background color of the parent"... :)

      – Roman Starkov
      Jan 9 '11 at 13:59













      @Drknezz: What is "WinForms Aero"? Is that what the cool kids are calling WPF nowadays?

      – Cody Gray
      Jan 9 '11 at 14:29





      @Drknezz: What is "WinForms Aero"? Is that what the cool kids are calling WPF nowadays?

      – Cody Gray
      Jan 9 '11 at 14:29













      @Cody WPF isnt just thew kid on the block, it eases development a lot and integrates a lot more HW-Accelerated features than WinForms, Check it out. [BTW: Have you been hiding on a cave or sth?] @Romkyns +1 XD

      – Machinarius
      Jan 9 '11 at 15:55






      @Cody WPF isnt just thew kid on the block, it eases development a lot and integrates a lot more HW-Accelerated features than WinForms, Check it out. [BTW: Have you been hiding on a cave or sth?] @Romkyns +1 XD

      – Machinarius
      Jan 9 '11 at 15:55





      2




      2





      @Cody I was referring to getting the Aero glass sheet effect on WinForms :p

      – Machinarius
      Jan 9 '11 at 16:04





      @Cody I was referring to getting the Aero glass sheet effect on WinForms :p

      – Machinarius
      Jan 9 '11 at 16:04











      0














      You are right. but here is the simplest way for making the back color of the label transparent
      In the properties window of that label select Web.. In Web select Transparent
      :)






      share|improve this answer



























        0














        You are right. but here is the simplest way for making the back color of the label transparent
        In the properties window of that label select Web.. In Web select Transparent
        :)






        share|improve this answer

























          0












          0








          0







          You are right. but here is the simplest way for making the back color of the label transparent
          In the properties window of that label select Web.. In Web select Transparent
          :)






          share|improve this answer













          You are right. but here is the simplest way for making the back color of the label transparent
          In the properties window of that label select Web.. In Web select Transparent
          :)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 3 '18 at 15:00









          Trupti SakpalTrupti Sakpal

          1




          1





















              0














              If you picture box in the background then use this:



              label1.Parent = pictureBox1;
              label1.BackColor = Color.Transparent;


              Put this code below InitializeComponent(); or in Form_Load Method.



              Ref: https://www.c-sharpcorner.com/blogs/how-to-make-a-transparent-label-over-a-picturebox1






              share|improve this answer



























                0














                If you picture box in the background then use this:



                label1.Parent = pictureBox1;
                label1.BackColor = Color.Transparent;


                Put this code below InitializeComponent(); or in Form_Load Method.



                Ref: https://www.c-sharpcorner.com/blogs/how-to-make-a-transparent-label-over-a-picturebox1






                share|improve this answer

























                  0












                  0








                  0







                  If you picture box in the background then use this:



                  label1.Parent = pictureBox1;
                  label1.BackColor = Color.Transparent;


                  Put this code below InitializeComponent(); or in Form_Load Method.



                  Ref: https://www.c-sharpcorner.com/blogs/how-to-make-a-transparent-label-over-a-picturebox1






                  share|improve this answer













                  If you picture box in the background then use this:



                  label1.Parent = pictureBox1;
                  label1.BackColor = Color.Transparent;


                  Put this code below InitializeComponent(); or in Form_Load Method.



                  Ref: https://www.c-sharpcorner.com/blogs/how-to-make-a-transparent-label-over-a-picturebox1







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 14 '18 at 19:28









                  Manjunath BilwarManjunath Bilwar

                  847710




                  847710



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4639482%2fhow-to-do-a-background-for-a-label-will-be-without-color%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Top Tejano songwriter Luis Silva dead of heart attack at 64

                      ReactJS Fetched API data displays live - need Data displayed static

                      Evgeni Malkin