Trasparent control (label) in Windows CE with C#

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
The window transparency is not supported on the OS level. The only way to
emulate this is to draw background image yourself
 
Thank you for your answer!

Do you have a short example for this? Or can you give me some tips how i can
do this?

Thanks in advance.

Hansen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top