How can I force my program to wait right where it is at for Invalidate to finish its code?
Here is my problem
There is a bool value set in OnPaint that indicates whether the picture was saved or not.
The problem is that Invalidate is called and does not wait to finish but immediately returns a false value that should be true because it was not set in OnPaint yet.
Here is my problem
C#:
public bool SaveSurface(string path)
{
this.save= true;
this.SavePath= path;
this.Invalidate();
return saved;
}
The problem is that Invalidate is called and does not wait to finish but immediately returns a false value that should be true because it was not set in OnPaint yet.