ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / External file functions
  • Selecting directories
  • Opening mode of the image picker
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Opens the image picker of Windows. The image picker is as follows:
Image picker
Note: On Android and iOS, the file selection dialog box is not available. Use AlbumPicker (to select an Image or Video file) or URISelect for all types of files.
// Sélection d'un fichier image
Fichier = fImageSelect("C:\Répertoires", "Fichier.gif", "Sélectionner une image", ...
	"JPEG (*.JPG)" + TAB + "*.jpg" + CR + "BMP (*.BMP)" + TAB + "*.gif")
Syntax
<Result> = fImageSelect(<Initial directory> , <File selected by default> , <Picker title> [, <Types of files> [, <Option>]])
<Result>: Character string
  • Full name of the selected file. If multiple files are selected, the names of the selected files are separated by Carriage Returns (CR).
  • Empty string ("") if no file was selected.
<Initial directory>: Character string
Full or relative path of the initial directory (up to 260 characters). This directory name may (or may not) end with "\". The files found in this directory are displayed in the image picker.
If this parameter is an empty string (""), the initial directory will be the current directory.
Windows
  • This parameter can be in Ansi or Unicode format.
  • From Windows 7 onwards, the operating system may not respect this directory, particularly if it has memorized a more convenient location based on the user's previous choices.
<File selected by default>: Character string
Name and extension of the file selected by default. If this parameter is an empty string (""), no file will be selected by default.
Windows This parameter can be in Ansi or Unicode format.
<Picker title>: Character string
Caption displayed in the title bar of the image picker. If this parameter is an empty string (""), the title of the current WINDEV window will be displayed.
Windows This parameter can be in Ansi or Unicode format.
<Types of files>: Optional character string
Description of types of files that can be selected. This description has the following format:
<Types Files> + TAB + <List Extensions>
[ + CR + <Types Files 2> + TAB + <List Extensions 2>]

  • <Types Fichiers> string describing the file type ("BMP (*.BMP;*.RLE)" for example).
  • <Liste Extensions> extensions corresponding to the type described ("*.BMP;*.RLE" for example).
For example:
"BMP (*.BMP;*.RLE)"+TAB+"*.BMP;*.RLE"+CR+"Icon (*.ICO)"+TAB+"*.ICO"+CR+
"Other"+TAB+"*.GIF;*.TIF;*.JPG"
Windows This parameter can be in Ansi or Unicode format.
<Option>: Optional Integer constant (or combination of constants)
Options that must be taken into account:
fSelMultiOpens the picker in multi-select mode. The user can select several image files by pressing the "Ctrl" and "Shift" keys.
fUnicodePath<Result> will be a Unicode string (by default, the function fImageSelect returns an Ansi string).
Remarks

Selecting directories

fImageSelect is used to select image files. To select a directory, use fSelectDir.

Opening mode of the image picker

Only the "Open" button is displayed in the image picker. To enable the "Record" button to appear in the image picker, combine functions fSelect and fGraphicFilter (see fGraphicFilter function example).
Business / UI classification: UI Code
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo fImageSelect
Exemplo fImageSelect

sFile is string
sFile = fImageSelect("c:\MATWIN14\", "", "Seleciona Uma Imagen", "Bmp" + TAB + "*.bmp" + CR + "Gif" + TAB + "*.gif" + CR + "Jpg" + TAB + "*.jpg")
IMG_image=sFile
//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/09/curso-windev-arquivos-014-arquivos.html
https://www.youtube.com/watch?v=yeYXUEqWoCw


De matos AMARILDO
07 Sep. 2016

Last update: 03/27/2025

Send a report | Local help