TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Farhan Shariff
NA
933
241.6k
How to check completion of thread
Jul 9 2014 5:46 AM
I want to enable button4 once all the if conditions in GoCheck fuction is completed
private void button4_Click(object sender, EventArgs e)
{
try
{
button4.Enabled = false;
Thread t1 = new Thread(GoCheck);
t1.IsBackground = true;
t1.Start();
}
catch
{
MessageBox.Show("Critical Error Check Input Files");
}
}
private void GoCheck()
{
try
{
//----CODE--------------------------------------------
//----CODE--------------------------------------------
//----CODE--------------------------------------------
//----CODE--------------------------------------------
if (duplicates_1.Count == 0 && duplicates.Count == 0 && asList.Count == 0)
{
MessageBox.Show("Input Successfully Verified");
}
}
catch
{
MessageBox.Show("Check Input File and Restart");
Environment.Exit(0);
}
}
Reply
Answers (
3
)
Get MAX and MIN Values in ArrayList
c#