How to accelerate form loading in C#?

  • Thread starter Thread starter Alexei
  • Start date Start date
A

Alexei

I have a form with more than 300 controls. The very first loading of
this form is relatively slow in C# (about 10-15 sec).
What is the best practice to accelerate form loading in C#? Do you
have some kind of preloading?

I have many tabs on this form . Can I load tab pages separately?
(When I show the first tab, I am loading the second one in a
background)?

Any ideas would be helpfull,
thank you, Alexei.
 
Thank you. It works. It turns out trickier than I expected, because it
looks
like Microsoft C# UI can not be updated from thread different from the
thread
where UI object has been created (please correct me if I am wrong
here): If I
create UI object in the background and use it in the main thread later
on, I should call Update from the thread where UI object has been
created. Finally I make it work, but it looks like the better way for
me to create this UI object
when application is loading.
 
Back
Top