Hi!
I'm developing a Windows Mobile app (Compact Framework 2.0 SP1) and this code it's generating me an error:
public Image Imagen
{
get
{
return imagen;
}
set
{
imagen = value;
this.Invalidate();
}
}
The code is called from a new thread. I've tried to solve using **InvokeRequired:
public Image Imagen
{
get
{
return imagen;
}
set
{
imagen = value;
if (this.InvokeRequired)
this.Invoke(this.Invalidate);
else
this.Invalidate();
}
}
But the line this.Invoke(this.Invalidate); doesn't compile. How can I solve the problem? The first error is that you can interact with controls created on another thread.
Thank you!