Página 1 de 1

Where to invoke TForm:RestoreState

Publicado: Sab Sep 01, 2007 10:44 pm
por Stephan Hennekens
Hi Xailer developers,
I am puzzling where to put the TForm:RestoreState() method. If I place it in
the FormShow event one can see the movement of the window from the design
position to the restored position. Therefore I tried to place in in the
FormInitialize event and this shows immediatelty the restored position.
Great! But, now the FormShow event is fired TWICE, leading to undesired
behaviour. So my question is what actually the best place is to execute the
RestoreState() method.
A second problem is that a GPF is raised when setting the second parameter
of the RestoreState() method to FALSE when executed the method in the
FormShow() event. No GPF if the method is executed from the FormInitialize
event.
BTW, I am very, very pleased with the SQLite support. It rocks and makes all
sort of database queries a lot more faster than doing the same stuff with
dBase files.
Regards,
Stephan