using System;
using System.Drawing;
using System.Windows.Forms;
class TV : Form
{
public class crap: Control {
public CreateParams cp {
get {
return base.CreateParams;
}
}
}
void created(object sender, EventArgs e) {
Console.WriteLine("Got created {0}", sender);
}
public TV()
{
crap c1;
Control c2;
c1 = new crap();
c2 = new Control();
this.Text = "Caption";
c1.Text = "Capt";
c1.HandleCreated += new EventHandler(created);
Console.WriteLine("Form CreateParams: {0}, Visible:{1}", CreateParams, Visible);
Console.WriteLine("CreateParams: {0}, Visible:{1}", c1.cp, c1.Visible);
Console.WriteLine("Handle for c1 created = {0}", c1.IsHandleCreated);
c2.Parent = c1;
Console.WriteLine("Handle for c1 created = {0}", c1.IsHandleCreated);
Console.WriteLine("Handle for c2 created = {0}", c2.IsHandleCreated);
// Controls.Add(c1);
}
public static void Main()
{
Application.Run(new TV());
}
}