delay in form load

Asked By Aamir Khan
09-Sep-10 03:32 AM
Earn up to 0 extra points for answering this tough question.
hi all,

          Application.Run(new frmSplash());
          Application.Run(new frmLogin());
first splash screen loads and close there after i call Login form which comes after few seconds. in login form only constructor is called.
how to avoid it..

  re: delay in form load

Super Man replied to Aamir Khan
09-Sep-10 03:45 AM

        Application.Run(new Form1());

        Application.Run(new Form2());

 

 

When you write like this.

Then Till Form1, is open, it will not execute second line, that’s why you can see that Form2 Is taking too much time to Load.

Once Form1 is closed, then it will start to run Form2.

  re: delay in form load

Sagar P replied to Aamir Khan
09-Sep-10 03:53 AM

Can you please explain more about your question?

If you just want to delay form load you can use current thread for that.... On form load just sleep it the time you want like;

private void Form1_Load(object sender, EventArgs e)

{

  Thread.Sleep(5000); //This will delay form load for 5 secs
}

  re: delay in form load

Aamir Khan replied to Super Man
09-Sep-10 04:23 AM
hey Khan
Thanks
where were you from last few days..
yesterday i post a question and looking for your answer..plz
my question is .
i want to add AccessDatabaseEngine.exe file as prerequisite how to do it...
Create New Account