private void btnImportar_Click(object sender, EventArgs e) { if (BgwImportar.IsBusy) { return; } if (string.IsNullOrEmpty(cmbTabla.Text)) { MessageBox.Show(@"Seleccione tabla a importar", @"Importar", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (string.IsNullOrWhiteSpace(txtRuta.Text)) { MessageBox.Show(@"Seleccione el archivo a importar", @"Importar", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } textoCombo = cmbTabla.Text; rutaArchivo = txtRuta.Text; lblProgreso.Visible = pbProgreso.Visible = true; pbProgreso.Minimum = 0; pbProgreso.Maximum = 100; pbProgreso.Value = 0; BgwImportar.RunWorkerAsync(); }