G
Guest
OK, I am trying to use a thread for the first time. I did not realize that
when you create a thread that you specifically have to go into the debugger
and identify the thread you wanted to look at. So now I have done that and
the first instruction of the method which is invoked by the Thread.Start,
instantiates a class which preforms a lot of processing. Upon it's return, I
want to set the message of my win form to indicate that the process completed
successfully and then turn on some buttons on the win form.
Well, I can follow in the debugger all the instructions of the class which
is instantiated, but when it should come back to the next instruction of the
method in the Thread.start, the debugger does not take me back to that
instruction. Is it legal for me to manipulate the win form from the
Thread.start method?
Here is the snipit of the code.
private void GenerateComboEditHtmlPages()
{
// Instantiate the class that does the processing
ComboEditReport editReport = new ComboEditReport(_HtmlOutputLoc,
_RuleDescLoc, _Environment, _CoverPage);
//Turn back on the win form command button
cmdRun.Enabled = true;
//Test if the process was successful and place the appropriate msg into
the label
if (editReport.ProcessSuccessful)
{ lblStatus.Text = "The request completed successfully"; }
else
{ lblStatus.Text = " **** The request was unsucessful *****" +
Environment.NewLine + "Detail Error Msg: " + editReport.Messages; }
panel1.Visible = true;
}
}
Thanks in advance for your assistance!!!
when you create a thread that you specifically have to go into the debugger
and identify the thread you wanted to look at. So now I have done that and
the first instruction of the method which is invoked by the Thread.Start,
instantiates a class which preforms a lot of processing. Upon it's return, I
want to set the message of my win form to indicate that the process completed
successfully and then turn on some buttons on the win form.
Well, I can follow in the debugger all the instructions of the class which
is instantiated, but when it should come back to the next instruction of the
method in the Thread.start, the debugger does not take me back to that
instruction. Is it legal for me to manipulate the win form from the
Thread.start method?
Here is the snipit of the code.
private void GenerateComboEditHtmlPages()
{
// Instantiate the class that does the processing
ComboEditReport editReport = new ComboEditReport(_HtmlOutputLoc,
_RuleDescLoc, _Environment, _CoverPage);
//Turn back on the win form command button
cmdRun.Enabled = true;
//Test if the process was successful and place the appropriate msg into
the label
if (editReport.ProcessSuccessful)
{ lblStatus.Text = "The request completed successfully"; }
else
{ lblStatus.Text = " **** The request was unsucessful *****" +
Environment.NewLine + "Detail Error Msg: " + editReport.Messages; }
panel1.Visible = true;
}
}
Thanks in advance for your assistance!!!