How to accelerate form loading in C#?

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.
 
A

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top