tags:

views:

76

answers:

1

Thanks to all. All ok. But i thought that in that way CreateInstance i can achieve transparent background in my png images. With PictureBox1 nothing works. Anyone can help? My code for transparent redraw paint e.Graphics.DrawImage(paint, x, y);

Thats my code:

ControlType = "WindowsFormsApplication1." + "PictureBox1";
System.Reflection.Assembly asm;
asm = typeof(Form).Assembly;
ControlObject = new PictureBox1;

ControlObject.Name = ControlName;
ControlObject.Location = new System.Drawing.Point(20, 20);// LOCATION!!!!
this.Controls.Add(ControlObject);
A: 

could it be that you didn't instantiate ControlObject?

ControlObject co = new PictureBox1;
co.name = ControlName;
Jim