ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Window functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
WinBackgroundImage (Function)
In french: FenImageFond
Modifies the background image of a window and specifies the display mode of this image.
Example
WINDEVReports and QueriesWindowsJavaUser code (UMC)
// Modification de l'image de fond de la fenêtre "FEN_SaisieImage"
// La nouvelle image est "C:\Documents\Fond.GIF"
// Cette image sera centrée dans la fenêtre
Res = WinBackgroundImage(FEN_SaisieImage, "C:\Documents\Fond.GIF", imgCentered)
Syntax
<Result> = WinBackgroundImage(<Window used> , <Image name> , <Display>)
<Result>: Boolean
  • True if the background image was modified,
  • False otherwise.
<Window used>: Window name
Name of the window to be used.
If this parameter corresponds to an empty string (""), the current window is used.
<Image name>: Character string
Name and full (or relative) path of the image to display in the window. A UNC path can be used. No image is displayed in the window if this parameter does not correspond to an existing image.
<Display>: Constant
Indicates the display mode of the image:
imgCenteredCentered: Image centered in the window.
imgHHomothetic: Image enlarged or reduced in size to match the proportions of the original image, so that it can be fully displayed in the window.
imgHCHomothetic centered: Image enlarged or reduced in size, respecting the proportions of the original image and centered in the window.
imgHCEHomothetic extended centered: Image enlarged or reduced in size, respecting the proportions of the original image, so that the smaller side of the image is displayed entirely in the window and centered in the window.
imgHCWISHomothetic without centered enlargement: If the image can be displayed entirely in the window, it is displayed at 100% and centered in the window.. Otherwise, the image is proportionally reduced so that it can be entirely displayed and centered in the window.
imgHEExtended homothetic: Image enlarged or reduced in size, respecting the proportions of the original image, so that the smaller side of the image is displayed entirely in the window.
imgHWISHomothetic without enlargement: If the image can be fully displayed in the window, it is displayed at 100%.. Otherwise, it is downsized, while maintaining its aspect ratio to fit the control.
imgNormal100%: Image displayed at 100% in the top left-hand corner of the window.
imgStretchedStretched: Image distorted to occupy the entire window surface.
imgTiledRepeatString: Image displayed at 100% and repeated to occupy the entire window (mosaic).
Component: wd300obj.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help