I'm writing a simple app to copy files from one location to another. It consists of only two forms:
The main form where the user selects source and destination and hits a button to begin the copy process
A pop-up form (frmProgress) with a progressbar, ok, and cancel button.
When the user hits the copy button on the main form the following code is invoked to call the pop-up form and begin the copy process. The .show() for the second form is invoked in the constructor. The .start() function of the pop-up form does the actual copying.
The problem I'm having is that the form comes up but only partially displays its elements... that is, the okay and cancel buttons are not showing and in their place is just grey space. At the end of the copy they finally appear. Why is this? It's as if the form starts to display, stops to start doing the copying, and then finishes displaying.
What I don't get is I called the .show() first, in the contstuctor, and then I called the .start()... why does the form not display everything first and do the copying? Also worth noting, is that I tried to do the .show() in a seperate thread by to no avail. Please help.
frmprog = new frmProgress(sourceControl.txtDestinationPath.Text, destinations);
frmprog.start();