Hello,
I'm hoping someone can help me with this. I'm new to C#, and can't figure out how to correct this.
I get the error: No overload for 'Lbl39Text' matches delegate 'System.Threading.SendOrPostCallback'
I'm using VS2010.
See the attached offending code (in red)!
Thanks!
Code:private void Lbl39Text(string NewText) { this.Label39.Text = NewText; this.Refresh(); }
Code:if (this.Label39.InvokeRequired) { // It's on a different thread, so use Invoke. SendOrPostCallback d1 = new SendOrPostCallback(Lbl39Text); this.Invoke(d1, new object[] { NewText }); } else { // It's on the same thread, no need for Invoke. this.Label39.Text = NewText; Refresh(); }




Reply With Quote