irigsoft Posted October 27, 2023 Share Posted October 27, 2023 Hello. I'm trying to find a way to speed up the loading of the main form. the principle of operation at the moment is the following (everything happens on the server side): 1. Upon login, the customer selects a design to use. This design is stored in a settings file (xml, json, txt) 2. After authorization in the system, the main form loads the file and starts creating the components as they are created in a normal Desktop application, and here in the FormCreate event I use Form.SuspendLayout and in FormReady - Form.ResumeLayout. Apparently something in my way of working is not right as I get a load time of 20 seconds for a 1.5MB component file (about 200 components like panel, groupbox, button, bitbtn, grid). I found some advice on the forum about using a hidden panel, but that moves all the main components (whose parent is the main form) and breaks the design, and doesn't make the form load faster. Can you guide me how to use a hidden panel or other component to speed up the loading of the form components. I must say that a very small fraction of the components that are in the design are used/seen in the form when it is opened (about 10%). Most components are shown or hidden based on user actions. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 27, 2023 Share Posted October 27, 2023 3 hours ago, irigsoft said: about 200 components like panel, groupbox, button, bitbtn, grid Hello, Is this all in the main form? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted October 28, 2023 Author Share Posted October 28, 2023 6 hours ago, Sherzod said: Hello, Is this all in the main form? Yes Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 28, 2023 Share Posted October 28, 2023 Maybe you should reconsider your design? Use forms, frames, page controls? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted October 28, 2023 Author Share Posted October 28, 2023 14 minutes ago, Sherzod said: Maybe you should reconsider your design? Use forms, frames, page controls? Is it possible to use Hidden Panel like parent for non visible components ? - How Hidden Panel or ContainerPanel ? is it possible to set style.display=none of some DOM elements? - How Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 28, 2023 Share Posted October 28, 2023 https://www.unigui.com/doc/online_help/api/uniPanel_TUniHiddenPanel.html Quote Link to comment Share on other sites More sharing options...
irigsoft Posted October 28, 2023 Author Share Posted October 28, 2023 1 minute ago, Sherzod said: https://www.unigui.com/doc/online_help/api/uniPanel_TUniHiddenPanel.html Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.