Question Here is a link to a sample code implementing a user interface ( SDI, because MDI is confusing for many users ). At the event : FormShow of the Main Form, I don't know how to restore the last embedded form, using its name and its Class name; any suggestions will be appreciated. htp://rapidshare.com/files/139302098/UserInterfaceGoodPractices.rar.html NB. the project uses only native delphi 2007 components. Thanks.
Answer Hello,I did not follow/learn the above url. But maybe you need to store all of the created forms in a list (TList)? Also, if you have a class-reference, you can always create a new instance of that
class. In
addition, any object has a ClassType property, so if you have an instance of a class, you can get its class-
reference. Sometimes, it's only required to make a type-cast first such as: The above examples are just what I usually do on my own applications. Hope that helps. Sincerely, |