Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. How make Form2 with progressBar in other thread, while downloading data in datagridview in Form1?

How make Form2 with progressBar in other thread, while downloading data in datagridview in Form1?

Scheduled Pinned Locked Moved Windows Forms
xmlquestion
2 Posts 2 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kroshandowski
    wrote on last edited by
    #1

    Hi!I have event, which when clicked begin downloading data in datagridview. I make so,but is wrong.Form2 must be in other thread.How make right?

    private void downloadToolStripMenuItem_Click(object sender, EventArgs e)
    {
    Form2 frm = new Form2();
    frm.Show();
    string path = "test.xml";
    DataSet ds = new DataSet();
    ds.ReadXml(path);
    dataGridView1.DataSource = ds;
    dataGridView1.DataMember = "table1";
    frm.Close();
    }

    Sorry for my english and thanks for advance.

    L 1 Reply Last reply
    0
    • K Kroshandowski

      Hi!I have event, which when clicked begin downloading data in datagridview. I make so,but is wrong.Form2 must be in other thread.How make right?

      private void downloadToolStripMenuItem_Click(object sender, EventArgs e)
      {
      Form2 frm = new Form2();
      frm.Show();
      string path = "test.xml";
      DataSet ds = new DataSet();
      ds.ReadXml(path);
      dataGridView1.DataSource = ds;
      dataGridView1.DataMember = "table1";
      frm.Close();
      }

      Sorry for my english and thanks for advance.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See http://msdn.microsoft.com/en-us/library/aa645740(v=vs.71).aspx[^].

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups