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 ListBoxes

Transparent ListBoxes

Scheduled Pinned Locked Moved C#
csharpdotnethelpquestion
4 Posts 3 Posters 0 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.
  • Z Offline
    Z Offline
    zagzagzag
    wrote on last edited by
    #1

    I'm having quite a problem figuring this out. In the microsoft SDK i found some functions to make controls transparent: SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.BackColor = Color.Transparent; and they said something about it had to be placed in the constructor????? Kinda lost. Can i apply this to the standart listboxes in the .Net framework, or do i have to create my own control which inherits the functions of a listbox? thanks in advance!

    A D 2 Replies Last reply
    0
    • Z zagzagzag

      I'm having quite a problem figuring this out. In the microsoft SDK i found some functions to make controls transparent: SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.BackColor = Color.Transparent; and they said something about it had to be placed in the constructor????? Kinda lost. Can i apply this to the standart listboxes in the .Net framework, or do i have to create my own control which inherits the functions of a listbox? thanks in advance!

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      can't you just change the opacity?

      1 Reply Last reply
      0
      • Z zagzagzag

        I'm having quite a problem figuring this out. In the microsoft SDK i found some functions to make controls transparent: SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.BackColor = Color.Transparent; and they said something about it had to be placed in the constructor????? Kinda lost. Can i apply this to the standart listboxes in the .Net framework, or do i have to create my own control which inherits the functions of a listbox? thanks in advance!

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        ListBox doesn't support transparency on it's own. If you want a transparent ListBox, then your going to have to create your own, inheriting from the current ListBox control and adding the code you posted. Search the articles for "custom listbox" and you'll come up with some examples. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        Z 1 Reply Last reply
        0
        • D Dave Kreskowiak

          ListBox doesn't support transparency on it's own. If you want a transparent ListBox, then your going to have to create your own, inheriting from the current ListBox control and adding the code you posted. Search the articles for "custom listbox" and you'll come up with some examples. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          Z Offline
          Z Offline
          zagzagzag
          wrote on last edited by
          #4

          Okay.. I'll do that! Thanks a lot for the help Regards! **EDIT** Back again. Now i have created a inherited custom control with listbox attributes. But when i set the color to transparen they just turn white. The thing is that you have to be able to see the picture behind the listboxes. Hope some of you have a solution to this!

          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