Okay I have to defend myself.
I do understand what you want now... (so you always want the FormShow of the base-class to execute.
But my stand remains... NEVER EVER use/create the OnCreate in the base-class. Use DoCreate for that. For OnCreate, use DoCreate. For OnShow, use DoShow. etc.
Then the descendant is free to assign a OnShow if it wants.
If you always want to execute the code in FormShow/FormDestroy you would use DoShow/DoDestroy.
Like this for you example:
type
TBaseform = class;
protected
procedure DoCreate; override;
procedure DoDestroy; override;
public
fFormname : string;
end;
procedure TBaseform.DoCreate;
begin
object1 := TObject.create; // first create
object2 := TObject.create;
fFormname := name;
inherited; // then call inherited which in turn calls OnCreate for descendants
end;
procedure TBaseform.DoDestroy;
begin
object1.Free;
object2.Free;
inherited;
end;
And in the descendant you can use the events:
procedure TInheritedform.Formcreate(Sender : TObject)
begin
object1.dosomething;
value := 'Hello';
end;
procedure TInheritedform.showname;
begin
//this is just an example of inheritence.
//I know that a formname can called directly
showmessage(fFormname)
end;
So the basic rule is don't mess with events (or assign them) in the base-class. Only use events in the last part on your form and in the IDE, not in base-classes. For base-classes you override the DoProcedures.