How can I solve this problem “Cannot Create Forms. No MDI forms are currently active”. I want to make a simple program that wod require a Login Form before it can acess the main form. I got three forms: Main Form (MDI Form), Form2 (MDIChild) and Login Form (Normal). Login form would appear first then the Main Form, then when I try to call on Form 2 from the Main form, an error would display “Cannot Create Forms. No MDI forms are currently active”.
I am using Delphi 7 on windows XP. I’m a beginner. Thank you very much sir.
How can I solve this problem Cannot Create Forms. No MDI forms are currently
Share
It sounds like you’re letting your LoginForm be auto-created, and it’s being created first. This won’t work, because the first form created by
Application.CreateFormin the project file becomes theApplication.MainForm. In order by be an MDI application, theMainFormmust be a MDI parent window.The solution is usually to not auto-create your login form, and instead create it yourself. To do so, you need to edit your .dpr file (
Project->View Sourcefrom the IDE’s main menu).Your project source should look something like this now (obviously, using your classes in the
Application.CreateFormcalls):You need to modify it so that the
LoginFormisn’t created first.