private void btnSetForegroundColor_Click(object sender, EventArgs e) { if (colorDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { UpdateForeColor updateForeColor = new UpdateForeColor() { UI = this, Color = colorDialog1.Color }; ColorInvoker invoker = new ColorInvoker(); invoker.Invoke(updateForeColor); } }