none
Create tab control and its child controls in the thread and use them on the main thread/process form RRS feed

  • Question

  • Hi there,

    I am having vb.net windows application. I use reflection to create an assembly having a control that has a tab control with tab pages and multiple controls (over 200+ controls in all) within each tab. It takes 4 seconds to load due to so many controls initialization. This tab control is added on the windows form while loading the form. Reflection is used to save the load time and it saves 1500 milliseconds in the overall loading. I was trying to explore if there is any possibility of of loading this assembly of a tab control in the thread which has various controls within it and once it is initialized, add it to the Form during loading of the form. I could not do it stating that controls created using one thread cannot be added to another thread/main process. If I can make it to background thread, I can always keep it cached and use it as required and save another 4 seconds that are taken by reflection.CreateInstance too.

    Any suggestions will be great help! Thanks in advance.



    GB

    Wednesday, October 25, 2017 8:50 AM

All replies

  • Hi gdhar,

    According to your description, I am not sure what are you doing, can you post some code here and point out where you want to make change, it is helpful to us to understanding. Thanks.

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 27, 2017 7:15 AM
    Moderator