private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { string[] s = e.Argument as string[]; sql.dropPresupuestosOnGridView(datagridviewNE1, constants.stringToInt(textBox2.Text) < 10 ? 10 : constants.stringToInt(textBox2.Text), s[2], s[0], s[1]); setcolors(); if (s[0] != "") { label7.Text = "Total del Periodo: (" + datagridviewNE1.Rows.Count + ") Presupuestos."; } else { label7.Text = string.Empty; } ///-------------------------------------------------------> MONITOR Form monitor = Application.OpenForms["monitor"]; if (monitor.InvokeRequired) { monitor.Invoke((MethodInvoker) delegate { if (monitor != null) { ((monitor)monitor).setData(datagridviewNE1.DataSource, label6.Text, getPeriodo(), checkBox3.Checked); ((monitor)monitor).setcolors(); } }); } else { if (monitor != null) { ((monitor)monitor).setData(datagridviewNE1.DataSource, label6.Text, getPeriodo(), checkBox3.Checked); ((monitor)monitor).setcolors(); } } }