Board index » delphi » Dynamically Creating/Destroy TFrames
Tom2000
![]() Delphi Developer |
Sun, 22 Dec 2002 03:00:00 GMT
Dynamically Creating/Destroy TFrames
I have a project using many frames within a base frame. At design time I place each frame within the base frame, and at runtime I display each frame by setting the active frame's visible property to True and all others to False. The active frame is determined by whichever button the user clicks on my main form. My problem is that by using this technique all my frames stay in memory (once they are shown) and take up valuable system resources. Currently using 20% of total resources -- way too much. Does anyone know how to dynamically create and destroy frames like you do forms. I want to do something similar to the following (but with frames): Application.CreateForm(TfrmBuydown, frmBuydown); Thanks, Tom |