Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
looked and looked and couldn't find a super simple way for newbies like me to get a transparent background on a listview box. (I know if it was a snake it would have bitten me, haha)

Maybe there's a super simple way to do what I'm wanting... I want to select from a list of subdirectories or listview items. The list or listview having a transparent background so you just see the text(in my case the names of subfolders). The form itself has a background image and I want that to show through into the list or listview box with the listview text visible along with the form background.

looking for simple, fast and clean :-)

* I'm a newbie and I probably won't pickup what you're putting down, but thanks for trying. :-)
Posted
Updated 25-Aug-10 22:45pm
v2

Controls do not support transparent background by default.
You can derive a usercontrol from the base listview class and add the capability to have a transparent background.

Here [^]is an article on how to make a custom listbox that include transparency.

Here[^] is a more basic article on making transparent controls.

See this [^]also.
 
Share this answer
 
This link[^] should be helpful. It basically says to derive a new class from the control and override the OnPaintBackground method to do nothing.

Copied from this previous answer:
PictureBox with Transparent Picture[^]
 
Share this answer
 
If making a transparent brush the background does not work, then it probably can't be done.
 
Share this answer
 
Comments
Toli Cuturicu 26-Aug-10 6:15am    
Reason for my vote of 1
false
BillW33 12-May-11 12:51pm    
It can be done, just not directly. See my answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900