Results 1 to 13 of 13

Thread: Label, Back Color - Transparent isn't transparent?

  1. #1

    Thread Starter
    New Member Zevoxa's Avatar
    Join Date
    Apr 2013
    Posts
    8

    Question Label, Back Color - Transparent isn't transparent?

    I set the back color on a label to transparent and it's not transparent?

    Name:  4-19-2013 8-57-05 AM.png
Views: 624
Size:  3.2 KB

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Label, Back Color - Transparent isn't transparent?

    Why is this in General Developer? This is obviously not a general question. It's a very specific question so it belongs in a specific forum. What language are you using and what type of application are you creating?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Label, Back Color - Transparent isn't transparent?

    Quote Originally Posted by Zevoxa View Post
    I set the back color on a label to transparent and it's not transparent?
    It looks transparent to the form to me as that's how WinForms behaves, is this WinForms or WPF?

    Why isn't this in a specific subforum? This isn't a general question...
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  4. #4

    Thread Starter
    New Member Zevoxa's Avatar
    Join Date
    Apr 2013
    Posts
    8

    Re: Label, Back Color - Transparent isn't transparent?

    I'm sorry, it seemed pretty general. Nothing too hard? I thought this is where it should go... If not, someone move it to the correct place where it belongs please... But how would I make it transparent to the color it's actually on? Which is a picturebox.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Label, Back Color - Transparent isn't transparent?

    Let me tell you something that I hate. I hate it when someone asks for help and I decide that I will take the time and make the effort to help them but, in order to do so, I need more information so I ask a question or two and the person who originally asked for help simply ignores the questions. You say:
    someone move it to the correct place where it belongs please
    Well, how exactly are we supposed to know where it belongs? JB and I both asked you questions and we asked them for a reason. If you want complete strangers to volunteer their time to help you then it is incumbent upon you to answer questions when asked.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Label, Back Color - Transparent isn't transparent?

    Quote Originally Posted by Zevoxa View Post
    I'm sorry, it seemed pretty general. Nothing too hard? I thought this is where it should go... If not, someone move it to the correct place where it belongs please... But how would I make it transparent to the color it's actually on? Which is a picturebox.
    That's one of the limitations of WinForms, the transparency is always that of the form, not whatever control is underneath it.
    That being said, you have two options: #1 instead of having the PictureBox on the form, you could use the Form's Paint event to paint whatever is in the PictureBox directly on the form or #2 you could upgrade it to WPF where it has this kind of stuff inherently built in.

    As for the thread, you know this is a .Net specific issue, so why not post it in one of the .Net specific subforum? Maybe the VisualBasic.Net or C# area?
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Label, Back Color - Transparent isn't transparent?

    We can't really move it yet, because we don't know which language you are using, so don't know which forum would be right... I would guess at some kind of VB, but there are many different versions of it (which is why we have multiple forums for them).

    If you let us know, I'll move your threads to the appropriate place.

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Label, Back Color - Transparent isn't transparent?

    Quote Originally Posted by JuggaloBrotha View Post
    That's one of the limitations of WinForms, the transparency is always that of the form, not whatever control is underneath it.
    Transparency is always that of the parent control. If this is indeed WinForms, which is likely but not guaranteed, and the desire is for the PictureBox to "show through" the Label then the Label needs to be a child of the PictureBox rather than the form. That can't be accomplished in the designer but it's very easy to write code to do it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  9. #9

    Thread Starter
    New Member Zevoxa's Avatar
    Join Date
    Apr 2013
    Posts
    8

    Re: Label, Back Color - Transparent isn't transparent?

    I'm pretty sure I'm using C++

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Label, Back Color - Transparent isn't transparent?

    Quote Originally Posted by Zevoxa View Post
    I'm pretty sure I'm using C++
    Maybe you could post back when you're absolutely sure. It worries me greatly that anyone could write code and not know what language it is but, if you really don't know and can't find out, post a bit of it and then we can probably work it out. If it is C++, is it C++/CLI, i.e. C++ targeting the .NET Framework, or is it unmanaged C++? What tool(s) are you using? It doesn't take much effort to paint a clear picture.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  11. #11
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Label, Back Color - Transparent isn't transparent?

    Quote Originally Posted by jmcilhinney View Post
    Transparency is always that of the parent control. If this is indeed WinForms, which is likely but not guaranteed, and the desire is for the PictureBox to "show through" the Label then the Label needs to be a child of the PictureBox rather than the form. That can't be accomplished in the designer but it's very easy to write code to do it.
    I know it can't be done in the designer, and I could swear making the Label a child of the PictureBox didn't do it either, but I have to admit I haven't done anything like that since .Net 2.0 so they might have changed that in the newer frameworks.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  12. #12

    Thread Starter
    New Member Zevoxa's Avatar
    Join Date
    Apr 2013
    Posts
    8

    Re: Label, Back Color - Transparent isn't transparent?

    Okay, let me try to rephrase everything.
    I'm using C++.
    I'm using Microsoft Visual Studio 2012 Ultimate.
    I'm using the template Windows Forums Application.
    What I'm trying to do is very complicated to explain and I'm trying to Google as much stuff as possible so I don't bother you guys.
    I'm going to college about C++ and more (not yet though). Most likely Java too. Then HTML & CSS. Maybe more. But for now, I basically don't know anything about C++. I want to at least have some knowledge of it before I do go to school for it, so I'm not completely dumbfounded of it.

  13. #13
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Label, Back Color - Transparent isn't transparent?

    Thread moved from the 'General Developer' forum to the 'C and C++' forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width