Example #1
0
        private void btnCrearPelotita_Click(object sender, EventArgs e)
        {
            //***************************************************************************************//
            Pelotita p = new Pelotita(this.pictureBox1);

            p.DoWork();
            //************************************************************************************************************************//
        }
Example #2
0
        private void btnCrearPelotita_Click(object sender, EventArgs e)
        {
            this.btnCrearPelotita.Click -= new System.EventHandler(this.btnCrearPelotita_Click);

            //***************************************************************************************//
            Pelotita p = new Pelotita(this.pictureBox1);

            Thread hilo = new Thread(p.DoWork);

            hilo.Start();
            //************************************************************************************************************************//
        }
Example #3
0
        private void btnCrearPelotita_Click(object sender, EventArgs e)
        {
            //***************************************************************************************//
            Pelotita p    = new Pelotita(this.pictureBox1);
            Thread   hilo = new Thread(p.DoWork);

            this.hilos.Add(hilo);

            hilo.Start();

            this.lblCantidad.Text = "Cantidad de Pelotitas = " + this.hilos.Count;
            //************************************************************************************************************************//
        }