"Cross-thread operation not valid: Control 'lstPrime' accessed from a thread other than the thread it was created on." = How can we solve this error??
Raj2786
0
Newbie Poster
Recommended Answers
Jump to PostThreading is a very complicated thing, and you can't access a control from another thread than the one it was created on which is almost always the GUI thread, or the thread that is started when the application runs.
The best idea here is to build a application modal …
Jump to Posthere is the code.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Threading; namespace DaniwebThreading.DancingLabels { public partial class Form1 : Form { public Form1() { InitializeComponent(); } Thread draw; private void Form1_Load(object sender, EventArgs e) { draw …
All 8 Replies
Diamonddrake
397
Master Poster
Ravenheart
1
Light Poster
Raj2786
0
Newbie Poster
Diamonddrake
397
Master Poster
Raj2786
0
Newbie Poster
Raj2786
0
Newbie Poster
Raj2786
0
Newbie Poster
Diamonddrake
397
Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.