Hi,
I found this online:
"If the SupportsTranspa rentBackColor bit is set to true, and the BackColor
is set to a color whose alpha component is less than 255, OnPaintBackgrou nd
will simulate transparency by asking its parent control to paint the
background."
What I've tried to do is this:
On the main form declared private TbJob tbJob (this is the textbox), as well
as set tbJob.Parent = pbEBS; (the picturebox I want as the background). Then
there's:
public class TbJob:TextBox
{
protected override void OnPaintBackgrou nd(PaintEventAr gs e)
{
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int,true);
this.SetStyle(C ontrolStyles.Do ubleBuffer,true );
this.SetStyle(C ontrolStyles.Us erPaint,true);
this.SetStyle(C ontrolStyles.Su pportsTranspare ntBackColor,tru e);
this.BackColor = Color.FromArgb( 0,255,0,0);
}
}
I've set all the things that the online help says to set, and I can't figure
out what I'm missing.
Thanks very much for any help!
Melanie
I found this online:
"If the SupportsTranspa rentBackColor bit is set to true, and the BackColor
is set to a color whose alpha component is less than 255, OnPaintBackgrou nd
will simulate transparency by asking its parent control to paint the
background."
What I've tried to do is this:
On the main form declared private TbJob tbJob (this is the textbox), as well
as set tbJob.Parent = pbEBS; (the picturebox I want as the background). Then
there's:
public class TbJob:TextBox
{
protected override void OnPaintBackgrou nd(PaintEventAr gs e)
{
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int,true);
this.SetStyle(C ontrolStyles.Do ubleBuffer,true );
this.SetStyle(C ontrolStyles.Us erPaint,true);
this.SetStyle(C ontrolStyles.Su pportsTranspare ntBackColor,tru e);
this.BackColor = Color.FromArgb( 0,255,0,0);
}
}
I've set all the things that the online help says to set, and I can't figure
out what I'm missing.
Thanks very much for any help!
Melanie
Comment