Situation:
- When you start the program from the Internet, an XML file is loaded with N elements (and the properties of each inside)
- Using XML, we retrieve the data, and based on them we dynamically create N Panel objects. When creating each Panel, additional data is downloaded from the Internet.
- After creation, each Panel is sent to the form (to be more precise, to the FlowLayoutPanel container).
Because of this, the launch of the application (the appearance of the form) takes 6-7 seconds, which is unacceptable.
I tried to make the whole function in a separate thread, but the compiler swears that you cannot create a child object in a container created in another thread.
What to do?