How do I update the GUI from another thread?

The simplest way is an anonymous method passed into Label.Invoke: // Running on the worker thread string newText = “abc”; form.Label.Invoke((MethodInvoker)delegate { // Running on the UI thread form.Label.Text = newText; }); // Back on the worker thread Notice that Invoke blocks execution until it completes–this is synchronous code. The question doesn’t ask about asynchronous … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)