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

Multi tool use
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
add a comment |
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
1
Rather than the nonsense ofColor.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
add a comment |
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
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
c# winforms
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 ofColor.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
add a comment |
1
Rather than the nonsense ofColor.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
add a comment |
4 Answers
4
active
oldest
votes
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!
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
add a comment |
this.label1.BackColor = System.Drawing.Color.Transparent;
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
|
show 1 more comment
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
:)
add a comment |
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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!
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
add a comment |
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!
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
add a comment |
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!
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!
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
add a comment |
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
add a comment |
this.label1.BackColor = System.Drawing.Color.Transparent;
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
|
show 1 more comment
this.label1.BackColor = System.Drawing.Color.Transparent;
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
|
show 1 more comment
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.BackColor = System.Drawing.Color.Transparent;
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
|
show 1 more comment
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
|
show 1 more comment
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
:)
add a comment |
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
:)
add a comment |
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
:)
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
:)
answered Aug 3 '18 at 15:00
Trupti SakpalTrupti Sakpal
1
1
add a comment |
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Nov 14 '18 at 19:28


Manjunath BilwarManjunath Bilwar
847710
847710
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
ioAQt,8,Q1ikHE0eLOSiBQgs7w0MkGp4zr2QyUP6paDkO3bk h6Twl9cNNrCQvlgoO3iOlxqi,aIBSnX 8vIhH4V9 jfo
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