Página 1 de 1
Centralise Form over parent ... easy way ??
Publicado: Lun May 21, 2007 3:46 pm
por ChrisGillard
Is there a function or method to call to Centralise a TForm ofer its parent
form ??
Hope so.
Chris
Centralise Form over parent ... easy way ??
Publicado: Lun May 21, 2007 8:15 pm
por jfgimenez
Chris,
> Is there a function or method to call to Centralise a TForm ofer its
> parent form ??
Setting the property lCentered from TForm gets the form centered on the
screen. If you need to center if relative to another form, you may use the
function:
CenterWindow( hWindow, [hBaseWindow] )
You may call it from the form's OnInitialize event:
METHOD FormInitialize( oSender ) CLASS TForm2
CenterWindow( ::Handle, ::oParent:Handle )
RETURN Nil
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
Centralise Form over parent ... easy way ??
Publicado: Mar May 22, 2007 1:18 pm
por ChrisGillard
Jose,
Works a treat ... thanks.
Am shipping my first small Xailer app today ... a 'Goods In delivery Diary'
for a wholesale company.
I think I can now do most of the techniques I need for bigger apps as well.
Xailer ... great piece of work.
Chris
"Jose F. Gimenez" <
jfgimenez@wanadoo.es> wrote in message
news:4651e1c9$[email=
1@ozsrv2.ozlan.local...]
1@ozsrv2.ozlan.local...[/email]
> Chris,
>
>> Is there a function or method to call to Centralise a TForm ofer its
>> parent form ??
>
> Setting the property lCentered from TForm gets the form centered on the
> screen. If you need to center if relative to another form, you may use the
> function:
>
> CenterWindow( hWindow, [hBaseWindow] )
>
>
> You may call it from the form's OnInitialize event:
>
> METHOD FormInitialize( oSender ) CLASS TForm2
> CenterWindow( ::Handle, ::oParent:Handle )
> RETURN Nil
>
>
> --
> Regards,
>
> Jose F. Gimenez
>
http://www.xailer.com
>
http://www.xailer.info
>