3
Reply

Threads C#

Paulo Luis

Paulo Luis

Jan 20 2011 12:34 PM
12.5k

Good afternoon,
I'm doing a code that every x time you access a web hosting and puts some information there. For that I am using threads, but I must be doing something wrong since the code is only called one time ...
I must be doing something wrong since I am beginner in this language. The idea is the application running continuously.
I'll put here the piece of code that performs what I want to be able to help:
 
private void Form1_Load(object sender, EventArgs e)
        {
            ActualizarBB ActualizarBBt = new ActualizarBB();
           
            Thread oThread = new Thread(new ThreadStart(ActualizarBBt.Actualizar));
            try
            {
                oThread.Start();
                Thread.Sleep(15);
            }
            catch (ThreadStateException ext)
            {
                MessageBox.Show(ext.ToString());
             }
           

         }



Answers (3)