I have a PictureBox Control on user control. The image the picturebox
contains is transparent. At design time I can set the BackColor property to
anything I want and it behaves exactly as expected and looks great . When I
try to change the backColor property at runtime it does not change it
remains at whatever I set it to at design time.
Assistance appreciated.
TIA
It works just fine for me.
See the code after my signature...

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
--------------------------------------
public partial class Form1 : Form
{
Timer t;
public Form1()
{
InitializeComponent();
t = new Timer();
t.Interval = 1000;
t.Tick += new EventHandler(t_Tick);
t.Enabled = true;
}
Random r = new Random();
void t_Tick(object sender, EventArgs e)
{
this.pictureBox1.BackColor = Color.FromArgb(r.Next(255),
r.Next(255), r.Next(255));
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Bitmap
img=(Bitmap)Image.FromStream(this.GetType().Assembly.GetManifestResourceStream("pbbackcolor.Bitmap1.bmp"));
img.MakeTransparent(Color.Magenta);
this.pictureBox1.Image = img;
}
> I have a PictureBox Control on user control. The image the picturebox
> contains is transparent. At design time I can set the BackColor property to
[quoted text clipped - 5 lines]
>
> TIA