winforms: Slow performance on form load
<p>I have a VB.NET winforms application. One of its forms, contains a flowlayoutpanel which I populate dynamically (programmatically) on form load event with pairs of label-textbox. My flowlayoutpanel is created in design time with all the properties set to default except below ones:</p>

<ul>
<li>AutoSize: true</li>
<li>AutoScroll: true</li>
<li>Dock: fill</li>
<li>FlowDirection: TopDown</li>
</ul>

<p>Then I populate it using below code within the form load event:</p>

<pre><code>Private Sub MyForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) 
Handles Me.Load
    Dim lbl As Label
    Dim txt As TextBox
    Dim flowLayout As FlowLayoutPanel
    Dim g As Graphics


For i As Integer = 0 To 253
    lbl = New Label
    lbl.Text = i.ToString("000") + ":"
    lbl.Anchor = AnchorStyles.None
    lbl.AutoSize = True

    txt = New TextBox
    txt.Text = "&lt;" + i.ToString.PadLeft(3, " ") + "&gt;"
    txt.MaxLength = 5
    txt.Anchor = AnchorStyles.None
    txt.ReadOnly = True
    g = txt.CreateGraphics
    txt.Width = g.MeasureString(txt.Text, txt.Font).Width + 5
    g.Dispose()

    flowLayout = New FlowLayoutPanel
    flowLayout.FlowDirection = FlowDirection.LeftToRight
    flowLayout.AutoSize = True
    flowLayout.Anchor = AnchorStyles.None
    flowLayout.Margin = New Padding(0)
    flowLayout.Padding = New Padding(0)

    flowLayout.Controls.Add(lbl)
    flowLayout.Controls.Add(txt)

    Me.FlowLayoutPnl.Controls.Add(flowLayout)
Next
End Sub
</code></pre>

<p>As I have stated above FlowLayoutPnl is created on design time and components on this are added following TopDown flow direction.</p>

<p>Above code produces this <a href="http://postimg.org/image/ewczu0wdn/" rel="nofollow">result</a>.</p>

<p>The problem here is that on opening this form it takes so much time (a few seconds) to open because it is doing all the stuff in form load event. It takes 35 seconds to open!. When all the stuff is done then form becomes visible after 35 seconds...</p>

<p>So I would like to know if there is some kind of method to speed up form load. I have read some posts here  saying about implement and show some kind of splash screen while it loads indicating user that it is being loaded or even perform an asynchronous load. What about creating a background thread from form load event in order to do this stuff? Anyone could guide me in the right direction? A very little example will be highly appreciated. How this kind of problems are normally resolved?</p>