peter muchemi wrote: > I've done a MDI application where i use > application.createform(tform1,form1) statements to > open my MDI Child forms.
Stop doing that. The *only* call to Application.CreateForm should be the one in your DPR file that creates your program's main form. If you want to create any other forms, then just call the constructor as you would with any other class. > I have a generic form that I > would like it to open other forms depending on a form > variable so that I can assign a variable like > vf:TForm; > vf := form2; > After calling application.createform(vf) it will open > form2. No, vf.Show will open the form. Application.CreateForm creates a new instance of the given class and stores the result in the given variable. > If i assign vf := form3 it will open form2. Only if you've previously assigned form3 := form2. > I am trying to avoid using so many if else statements. Please you show us some of the code you're trying to avoid. (Copy and paste.) I think you're misusing some terminology, and it's hiding what your true goal is. -- Rob ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

