Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pictureBox

Status
Not open for further replies.

seanbo

Programmer
Jun 6, 2003
407
GB
is there anyway of making a pictureBox translucent? pictureBox.BackColor.Color.FromArgb(128, Color.White) leaves it opaque.
 
I don't think so. look in:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/cpref/html/frlrfSystemWindowsFormsControlClassBackgroundImageTopic.htm
If you want the picture to be translucent, load the picture to a bitmap class and process the image to be translucent.
 
it's not the picture i wnt to have translucent, there isn't even a picture in it (don't let the class name 'picturebox' fool you), i want to see through the background.

the problem as i see it is that i can't extend the method that draws the background, and stop it from doing so. i can only gain access to PictureBox.Paint - which seems to be called after the background has been drawn opaque.
 
If I understand you right, you wish to make your form translucent, the window behind it or the desktop will be partly seen. You can set the Opacity property of the form between 0 to 100 percent.
 
with what property?

i tried setting the background colour to one that was translucent (see code aove) and that didn't work. i can't find a property called alpha, opque, translucent, transparent or anything like that.
 
The color you chose is not translucent. The property is "Opacity". You can find it at the properties window. If you set it to 100%, the form will be normal. translucent is 50%.
 
there is no opacity property in picturebox. only in form and printpreviewdialog.
 
If you look at the help page I have written above, you will see that you can't do it on a picturebox. What's wrong with doing this on the form?
 
nothing as such, i'm just trying to avoid any unessesary programming. i suspect that, when i get to work tomorrow, i will change it from picturebox to panel.

i got no love from the hyperlink you posted, but thanks anyway. you've confirmed what i was hoping you wouldn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top