RE:Como centrar ventana en XP??????
Hola
Fijate con este codigo
Ahora si estas con la Version 9
es una propiedad de la windows
solo debes activar la casilla Center.
//*-----------------------------------------------------------------*/
//* f_Center: Center the window
//*-----------------------------------------------------------------*/
int li_screenheight, li_screenwidth, li_rc, li_x=1, li_y=1
environment lenv_obj
/* Check for a window association with this object */
If IsNull ( this ) Or Not IsValid ( this ) Then Return -1
/* Get environment */
If GetEnvironment ( lenv_obj ) = -1 Then Return -1
/* Determine current screen resolution and validate */
li_screenheight = PixelsToUnits ( lenv_obj.ScreenHeight, YPixelsToUnits! )
li_screenwidth = PixelsToUnits ( lenv_obj.ScreenWidth, XPixelsToUnits! )
If Not ( li_screenheight > 0 ) Or Not ( li_screenwidth > 0 ) Then Return -1
/* Get center points */
If li_screenwidth > this.Width Then
li_x = ( li_screenwidth / 2 ) - ( this.Width / 2 )
End If
If li_screenheight > this.Height Then
li_y = ( li_screenheight / 2 ) - ( this.Height / 2 )
End If
/* Center window */
li_rc = this.Move ( li_x, li_y )
If li_rc <> 1 Then Return -1