This is giving me error: analyzeparameters.pas(9,3) Fatal: Cannot find Application used by AnalyzeParameters of the Project Inspector.
How can create a type at separate file?
Independant of the error you get you have a separate problem: you can't inherit from a class declared in the main project file (your
TMain) inside a unit (your
TAnalyzeParameters). If you want to do it that way you need to move your
TMain to a separate unit as well, use that from your
AnalyzeParameters unit and then instantiate your
Application variable in your main project file using
TAnalyzeParameters.Create instead of
TMain.Create. If you do it like that then you don't need to add
Application to your
uses-clause in
AnalyzeParameters (which was wrong anyway).
Additional side note: you don't need to declare a pointer type for your
TAnalyzeParameters. It's really,
really seldom that you need a pointer type for a class, because classes are hidden pointers by themselves already.