ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / External file functions
fGraphicFilter (Example)
WINDEVReports and QueriesJavaUser code (UMC) Opening a selected file
The following code is used to open a file. This file is an image file or a text file. This file is selected by fSelect.
// Declare the variables
FileNameAndPath is string
ListImageFiles is string
FileID is int
 
// Retrieve the list of image formats supported by WINDEV
ListImageFiles = fGraphicFilter()
 
// Select file to open
FileNameAndPath = fSelect("", "File.txt", "Select a file", ...
ListImageFiles + CR + "Text file (*.TXT)" + TAB + "*.txt", "TXT", ...
fselOpen + fselExist)
 
// Open file
FileID = fOpen(FileNameAndPath, foReadWrite)
// Display an error message if the opening was not performed
IF FileID = -1 THEN
Error(ErrorInfo(errMessage))
ELSE
// Processes in the opened file
...
// End of processes
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 08/25/2022

Send a report | Local help