Author | Message | ||||
---|---|---|---|---|---|
Mickey Ametuar Posts: 115 | We know how important is for applications to use as much less memory as they can. Just imagine if we have an application with a lot of forms 50-100 all of them are on heap. (static variables). We call these forms with Form1.Show, Form2.Show ... etc. In Delphi we can make them dynamic easy. I will show in a few steps. Let’s suppose that we have a project with n forms. Form1, Form2, Form3 ... FormN. If Form1 is our main form, which is always created on startup. We can make Form2 – FormN dynamic (not alocating any memory on heap only when they are needed/shown). To do this go to “Project” menu ---> “Options” ---> “Forms” tab. You can see Main form, Auto-create forms, Available forms. Select Main form := Form1 Move Form2 – FormN from "Auto-create forms" list to "Available forms" list and press OK. Screenshots:
That’s all folks. |