Author: Andreas Busch
How can I test a component without installing it?
Answer:
If you are developing a new component, it takes a lot of time to test every change
by installing the component. But there is a easier way to do this:
First, create a new project.
Then add the unit with the component's source code to the 'uses ...' line.
The last thing you have to do is to add the OnCreate event of your form an add the
code as shown in the following example.
1 procedure TForm1.FormCreate(Sender: TObject);
2 begin3 with TComponent1.Create(self) do4 begin5 Parent := self; // This makes the component visible at runtime6 {now you can define the values for other properties }7 Caption := '...';
8 Left := 100;
9 Top := 100;
10 {...}11 end;
12 end;