The first thing you need to do is find out what is causing the exception - we can't because we can't see your screen, access your HDD, or read your mind! :laugh:
At the beginning of your click event, add a try block, and it's catch at the end:
private void button1_Click(object sender, EventArgs e)
{
try
{
... All your code goes here
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
With any luck, the error and trace will point you at the offending code.
If it doesn't then we need the error details, and the code that generated it.