I thought Shown would be the answer. But it seems that not all controls are equal. A panel is shown immediately, while a label – not.
I have the following code:
public partial class Form2 : Form
{
Panel p = new Panel() { BackColor = Color.Green };
Label l = new Label() { Text = "abc", Location = new Point(0, 100) };
public Form2()
{
Controls.Add(p);
Controls.Add(l);
Shown += new EventHandler(Form2_Shown);
}
void Form2_Shown(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(2000);
}
}
Which, initially, shows this:

And after 2 seconds – this:

So how do I run code after “the second image”?
Add the following at the beginning of the event handler: