How to ensure the GUI elements and loaded before proceeding in C#
<p>I am a beginner to C#. I am trying to make a simple program that displays the links from a website into a ListBox. Since retrieving the links takes time, my GUI waits till all the links are parsed and ListBox populated before it becomes visible.</p>

<p>I would assume that this is because the InitializeComponent() and my ParseLinks() methods run in the same thread. I would like to know if there is way I could run ParseLinks() after the UI elements are loaded.</p>

<pre><code>    public mainForm()
    {
        InitializeComponent();
        ParseLinks();
    }
</code></pre>

<p>I would appreciate any input. Thanks</p>

<p>[Edit]</p>

<p>More info on <code>ParseLinks()</code>: (I am giving the summary since the code is quite extensive)
<p>
<code>ParseLinks()</code> gets the links into an arraylist and assigns the arraylist to the <code>ListBox</code>. The whole operation works very well. But I wanted the GUI to be displayed and then the <code>ListBox</code> populated. I am also disabling a Button while at it and also changing a <code>ProgressBar</code> Style to <code>Marquee</code>. Referring to the response I gave below, when I used <code>Backgroundworker</code>, I got multiple cross-thread operation error which I solved by placing the GUI editing code inside one <code>InvokeRequired</code> statement</p>
