ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Window functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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)
// Modify the background image of "WIN_EditImage"
// The new image is "C:\Documents\Bkgd.GIF"
// This image will be centered in the window
Res = WinBackgroundImage(WIN_EditImage, "C:\Documents\Bkgd.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 (by respecting the proportions of the initial image) to occupy the entire surface of the window.
imgHCHomothetic centered: Image enlarged or reduced (by respecting the proportions of the initial image) and centered in the window.
imgHCEHomothetic centered extended: Image enlarged or reduced (by respecting the proportions of the initial image) so that the smaller side of the image is entirely displayed in the window and centered in the window.
imgHCWISHomothetic centered without enlargement: If the image can be entirely displayed 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.
imgHEHomothetic extended: Image enlarged or reduced (by respecting the proportions of the initial image) so that the smaller side of the image is entirely displayed in the window.
imgHWISHomothetic without enlargement: If the image can be entirely displayed in the window, it is displayed at 100%. Otherwise, the image is proportionally reduced in order to be entirely displayed.
imgNormal100%: Image displayed at 100% in the top left corner of the window.
imgStretchedStretched: Image stretched across the entire surface of the window.
imgTiledTiled: Image displayed at 100% and tiled to occupy the entire surface of control (tile).
Component: wd290obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help