Can not make a control transparent. Help!

  • Thread starter Thread starter Daimy
  • Start date Start date
D

Daimy

Can not make a control transparent in XP.

Please help me.

Thanks!



public class Class1 : System.Windows.Forms.CheckBox
{

public Class1()
{
this.Left=50;
this.Top=50;
this.Width=32;
this.Height=32;

this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.BackColor=Color.Transparent;
}

}//



//FORM
public Form1()
{
Class1 obj=new Class1();
this.Controls.Add(obj);
}
 
Back
Top