Promotic
WikipediaLinkedInYoutubeTwitterFacebook

InputBoxForFilePath - method of object Pm

Description:
Input window for displaing and selection of files/folders.
Syntax:
InputBoxForFilePath(sTitle As String, nStyle As Long, sFilePath As String, sExt As String, sFilter As String) As Boolean
Calling:
b = Pm.InputBoxForFilePath(sTitle, nStyle, sFilePath, sExt, sFilter)
Parameters:
sTitle(String) Title of the input window.
nStyle(Long) It is possible to enter the following styles or their combinations using sum:
&H100 - Cannot go through the subfolders.
&H200 - Cannot go through the parent-folders.
&H300 - Cannot change the folder.
&H400 - Selected file must exist.
&H1000 - Selected file mustn't exist.
&H800 - Confirmation is requested.
&H2000 - Folders are not displayed.
&H4000 - Only folders are displayed.
&H10000000 - Window will be "Always on top".
&H8000 - The window can be closed only by selecting the file. This means that if the folder (marked in blue) is selected, then the window cannot be closed by the OK button.
sFilePath(String) It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.
 
on the calling: the full path to the file or folder (for the window initialization).
after the calling: the selected file or folder.
sExt(String) Default extension of the selected file.
sFilter(String) String enabling the filtering of the file content. Examples:
- display of all files: sFilter="All files (*.*)|*.*||"
- display files with the extension '.TXT': sFilter="TXT files (*.TXT)|*.TXT||"
- display files with the extension '.TXT' and '.INI': sFilter="TXT files (*.TXT)|*.TXT|INI files (*.INI)|*.INI||"
Return Values:
true - If the window has been closed by the OK button.
false - If the window has been closed by the Cancel button.
Note:
It enables depending on the nStyle parameter to go through folders on the disk and to select (or enter) the file or the folder. If the window is closed by the OK button, the full path with the filename is stored in the sFilePath.
 
This method is not functional for Web Panels.
Example:
Dim sFile, sFilter
sFile = "#appres:triangle.jpg"
sFilter = "Images (*.jpg)|*.jpg|All files (*.*)|*.*||"
If Pm.InputBoxForFilePath("Choose a picture", &H200, sFile, "jpg", sFilter) Then
  Pm.Debug "file = " & sFile
End If
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- InputBoxForFilePath
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice