adino2 0 Newbie Poster
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Threading;

namespace Something
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Thread recording_thread;
            recording_thread = new System.Threading.Thread(new ThreadStart(record_run));
            recording_thread.Start();

            label1.Text = "Loading";
        }

        public void record_run()
        {
            Do Something
        }
    }
}

Above is part of my code ......... Well initially i was planning to run a thread as soon as the page load ......... while the tread is running the form is supposed to show a message to user stating that the form is performing its task

Instead .... the form will only be shown to user when the task in the thread complete.

Please help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.