jmartial wrote:Hola,
Necesitaría poner una ventana maximizada con una imágen de fondo, hasta ahí bien, creo un brush con la imágen y la asigno.
Pero después de unos segundos necesito cambiar esa imágen de fondo por otra, la cambio asignando otro brush. Pero se nota el PARPADEO.
¿Conocéis alguna forma de cambiar una imágen de fondo de una ventana, por otra sin que se note ningún parpadeo?
You do not need to do any coding. Define a brush with your image with style STRETCH or RESIZE.
Example:
- Code: Select all Expand view RUN
DEFINE BRUSH oBrush FILE <your image file> STRETCH
DEFINE WINDOW oWnd
oWnd:SetBrush( oBrush )
ACTIVATE WINDOW oWnd
RELEASE BRUSH oBrush
Now the whenever the window is resized, the brush automatically gets resized (stretched) to fit the client area of the window. The brush object automatically handles the resizing. Resizing is smooth without any flickers.
For Image file, you can use bmp, jpg, png or any other image format.
You do not have to write any code to keep resizing the brush. We recommend you not to.
Brush object supports two kinds of resizing:
1) STRETCH: The entire image is resized to the width and height of the client area of the window. This can distort the image. Particularly if the image contains a photo the faces may get too widely or narrowly streched.
2) RESIZE: Image will be resized retaining the proportion of width/height of the original image to the extent that the window is fully covered with the image.
Eg: DEFINE BRUSH oBrush FILE "myphoto.jpg" RESIZE
You can also use Brush object for Gradients.
DEFINE BRUSH oBrush GRADIENT aGradient VERTICAL (or) HORIZONTAL.
This brush also gets resized with the window automatically.
These resizable brushes were first introduced in FWH 11.05.