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
narasimman g
1.6k
160
351.7k
Progress bar is not running
Dec 13 2010 11:03 PM
Hi All,
Am using a delegate
delegate
void
MyDelegate
(
bool
show);
and accessing delegate using
Invoke(
new
MyDelegate
(ShowProgressBar),
true
);
public
void
ShowProgressBar(
bool
show)
{
Progressbar1.Visible = show;
}
I need to run another function on button click
btnstart_click
{
Invoke(
new
MyDelegate
(ShowProgressBar),
true
);
RunProgressbarfunction();
Invoke(
new
MyDelegate
(ShowProgressBar), false
);
}
Problem is Runprogressbarfunction accessing Form controls and assigning values for properties on run time (i.e. label1.visible=true;) and getting the below error.I have peeped thru google.Tried all methods still showing the same error.anyone could resolved this?
Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on.
Reply
Answers (
1
)
generated arrays, each containing 100 numbers.
DATAREADER