Cómo controlar la visualización de la pantalla de la ventana principal del programa Foxpro
En VFP6.0
No hay ningún atributo Anchor ni función Bindevent, por lo que necesita usar _Parent.Resize en la definición de clase para implementar el anclaje:
Definir clase BackImage como imagen
Stretch = 2
Procedimiento Parent.Resize
This.Move(0, 0, This.Parent.Width, This. Parent .Height)
EndProc
EndDefine
Luego use el siguiente código para agregar a _Screen:
_Screen.AddObject('BackImage ' , 'BackImage')
Con _Screen.BackImage
.Picture = m.cPicture
.Move(0, 0, _Screen.Width, _Screen. Altura )
.Visible = .T.
EndWith
En VFP7.0 y versiones posteriores
Agregar una imagen en _Screen Control como fondo, establezca la propiedad Estirar en Relleno variable, ajuste su tamaño y posición para que ocupe toda la pantalla y luego establezca el valor de anclaje en 15. El código es el siguiente:
If !PemStatus(_Screen, 'BackImage', 5) Then
_Screen.AddObject('BackImage', 'Image')
EndIf
Con _Screen.BackImage
.Stretch = 2
.Picture = m.cPicture
.Move(0, 0, _Screen .Width, _Screen.Height)
.Anchor = 15
.Visible = .T.
EndWith