Click here to Skip to main content
15,905,785 members

Comments by atlquaker (Top 11 by date)

atlquaker 26-Jan-11 11:53am View    
Main.cs is the main core form of the application. When the user clicks the Process button, I give the user some output options in a new form:
Options optionsForm = new Options;
optionsForm.ShowDialog();

On the options form, the user selects different processing options then clicks a "Go" button which displays the Processing form:

PleaseWait pleasewaitForm = new PleaseWait();
pleasewaitForm.ShowDialog();

On processingForm load, I start the background worker. On background worker complete, I want to close the please wait form and display a "Work complete" form. I know the background worker is doing its job but it is never closing the Please Wait form. Let me know if you need more details, do you have any ideas?
atlquaker 25-Jan-11 21:38pm View    
Still working on this issue... anyone have any other suggestions?
atlquaker 20-Jan-11 10:53am View    
No, this does not refer to the main form. This is how I have it set up: User clicks "Process" on main form which shows PleaseWait.cs form. The onLoad event on the PleaseWait.cs form kicks off the backgroundworker. On backgroundworker complete, I want to close PleaseWait.cs and show Complete.cs form. All the while, Main.cs remains open in the background. Let me know if I explained this well. Thanks again for helping me out.
atlquaker 19-Jan-11 13:13pm View    
private void backWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.Invoke((MethodInvoker)delegate{ProcessComplete();});
}

private void ProcessComplete()
{
this.Close();
ProcessCompleteForm pf = new ProcessCompleteForm();
pf.Show();
}
atlquaker 19-Jan-11 12:59pm View    
Here is my code so you can see exactly what I am doing...

private void backWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
this.Invoke((MethodInvoker)delegate{ProcessComplete();});
}

private void ProcessComplete()
{
this.Close();
ProcessCompleteForm pf = new ProcessCompleteForm();
pf.Show();
}