I am Having a problem on the below code..
In Windows Application...
Here pan2 is a Panel Control
private void ThreadTask()
double time = hr + (min * 0.016712299);
double kmhr = Convert.ToInt32(Txtkm.Text) * 1.609344;
double distance = kmhr * time;
distance = distance - distanc;
x = Convert.ToInt32((distance / 10.0)) - x3;
y = Convert.ToInt32((distance / 10.0)) - y3;
Error Message is
Cross-thread operation not valid: Control 'pan2' accessed from a thread other than the thread it was created on.