G
Guest
I want to make a trasparent control (label) for windows CE.
I create a new class inherited from Control
i override the OnPaint and the OnPaintPackground
in the on OnPaintBackground i to nothing:
protected override void OnPaintBackground(PaintEventArgs e)
{
//
}
in the OnPaint i draw the text:
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.DrawString(Text, Font, new SolidBrush(Color.Red),
this.ClientRectangle);
}
The problem is that i see not the Parent Background. I see the "Desktop"
background! What is wrong? I want to see the image who is on the Parent Form.
Thanks in advance!
Hansen
I create a new class inherited from Control
i override the OnPaint and the OnPaintPackground
in the on OnPaintBackground i to nothing:
protected override void OnPaintBackground(PaintEventArgs e)
{
//
}
in the OnPaint i draw the text:
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.DrawString(Text, Font, new SolidBrush(Color.Red),
this.ClientRectangle);
}
The problem is that i see not the Parent Background. I see the "Desktop"
background! What is wrong? I want to see the image who is on the Parent Form.
Thanks in advance!
Hansen