You can do something like:
declare the procedure like:
procedure DoIt(DummyParam: PtrInt);
then in OnActivate do
Application.QueueAsyncCall(@DoIt, 0);
It will queue DoIt in the Apllication queue, so it will be executed after all items in the queue are handled. In effect this means that DoIt will be executed after the form has been drawn on the screen.
Bart