Found a way. By overriding the onPaintBackgrou nd method:
private class TransparentPane l : Panel
{
public TransparentPane l()
{
}
//This method makes sure that the background is what is directly behind the
control
//and not what is behind the form...
override protected CreateParams CreateParams
{
get
{
CreateParams cp = base.CreatePara ms;
cp.ExStyle |= 0x20;
return cp;
}
}
override protected void OnPaintBackgrou nd(PaintEventAr gs e)
{
// do nothing
}
}
"Marco Martin" <ma**********@s ympatico.ca> wrote in message
news:mV******** ************@ne ws20.bellglobal .com...
Hi,
I have a picturebox with a bitmap inside. I need to add a panel to the
picturebox, but I have to see behind. Meaning, the panel has to be
transparent but not invisible. This panel will hold other images that I
will or wont display through code.
I'm saying panel, but it really doesn't matter. It could be any container
control that has height/width and location properties.
Any ideas would be greatly appreciated.
regards,
Marco