How to use thread when button click event in windows form?
<p>I`m making windows application.</p>

<p>In my application, working process is like this.</p>

<ol>
<li><p>Write a Target site url in text box and Click Start button.</p></li>
<li><p>At first, compare between site url in textBox and real site url if it matched, start analyse site and insert into Database, then, showed that data to Datagridviwe in windows forms.</p></li>
</ol>

<p>But the problem is... when site information is big, sometimes windows form is freezing.. but it works well....</p>

<p>So I want to add a progress bar and display it, use thread or backgroundworker?</p>

<p>But I never use thread or like that... I don`t know any idea about it...</p>

<p>Please somebody help me or give some advice....</p>

<p>my code is like that.(simplify)</p>

<pre><code>public partial class Site_Statistics : MetroFramework.Forms.MetroForm

{
    public Site_Statistics()
    {
        InitializeComponent();                        
    }

    private void Migration_Statistics_Load(object sender, EventArgs e)
    {

    }

    private void mtbtnStart_Click(object sender, EventArgs e)
    {            
        insertWebApplicationInfo();

        SelectWebApplicationInfo();
    }

    private void insertWebApplicationInfo()
    {
        //Insert to database works here
    }

    private void SelectWebApplicationInfo()
    {
         //Select from database works here
    }
}
</code></pre>