G
Grant Merwitz
Hi
I am trying to thread a large process to show the user a 'processing' gif
while this thread loads
what i have done, is create a submit_click method and set it to be a thread.
In the start of the thread i hide the main panel on the page, and show a
hidden image ('loading.gif')
I then create a threadstart and perform my larger process.
At the end of this larger process, i hide the 'loading.gif' and display the
main panel again.
The image shows fine at the beginning of the large process, but doesn't hide
when it is finished ... why?
sample code:
[MTAThread]
private void Submit_Click(object Sender, EventArgs e)
{
//show the loading panel
MainPanel.Visible = false;
ImagePanel.Visible = true;
//Start the larger process
ThreadStart TS = new ThreadStart(PerformAuthorisation);
Thread workerThread = new Thread(TS);
Thread.Start();
}
[MTAThread]
private void PerformAuthorisation()
{
//large processing goes here
//Show the main panel again
MainPanel.Visible = true;
ImagePanel.Visible = false;
}
So, the loading panel is shown correctly in the first place, but the reverse
is never done.
Any ideas
TIA
Grant
I am trying to thread a large process to show the user a 'processing' gif
while this thread loads
what i have done, is create a submit_click method and set it to be a thread.
In the start of the thread i hide the main panel on the page, and show a
hidden image ('loading.gif')
I then create a threadstart and perform my larger process.
At the end of this larger process, i hide the 'loading.gif' and display the
main panel again.
The image shows fine at the beginning of the large process, but doesn't hide
when it is finished ... why?
sample code:
[MTAThread]
private void Submit_Click(object Sender, EventArgs e)
{
//show the loading panel
MainPanel.Visible = false;
ImagePanel.Visible = true;
//Start the larger process
ThreadStart TS = new ThreadStart(PerformAuthorisation);
Thread workerThread = new Thread(TS);
Thread.Start();
}
[MTAThread]
private void PerformAuthorisation()
{
//large processing goes here
//Show the main panel again
MainPanel.Visible = true;
ImagePanel.Visible = false;
}
So, the loading panel is shown correctly in the first place, but the reverse
is never done.
Any ideas
TIA
Grant