PdcApplication.SaveFileDialog: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == SaveFileDialog(InitialDirectory As String, FileMask As String, FileName As String) as String == Description == Open a file browser dialog via Bemet to selec..."
 
No edit summary
 
Line 1: Line 1:
== Declaration ==
== Declaration ==
SaveFileDialog(InitialDirectory As String, FileMask As String, FileName As String) as String
SaveFileDialog(FileMask As String, FileName As String) as String


== Description ==
== Description ==
Line 7: Line 7:


== Parameters ==
== Parameters ==
InitialDirectory : the initial directory where the file browser is opened. If this is empty, or the directory cannot be found, it will open at the root level.<br>
FileMask : A pattern that used to filter the files that are shown and can be selected. If this is empty the default '*.*' is used.<br>
FileMask : A pattern that used to filter the files that are shown and can be selected. If this is empty the default '*.*' is used.<br>
FileName: The pre-entered filename to save as. This can still be changed by the user in the dialog.
FileName: The pre-entered filename to save as. This can still be changed by the user in the dialog.
Line 17: Line 16:
== Code example ==
== Code example ==
<source lang="vb">
<source lang="vb">
Dim Result As String = PDC.App.SaveFileDialog(tbInitialDirectory.Text, tbFileMask.Text, tbFileName.Text)
Dim Result As String = PDC.App.SaveFileDialog(tbFileMask.Text, tbFileName.Text)
</source>
</source>


== Availability ==
== Availability ==
Available since march 2023. Bemet 2023R2 and higher.
Available since march 2023. Bemet 2023R2 and higher.

Latest revision as of 11:14, 25 September 2023

Declaration

SaveFileDialog(FileMask As String, FileName As String) as String

Description

Open a file browser dialog via Bemet to select a location and filename to save as. This will return the full path of the selected file as a String. If this form is canceled without selecting a file, an empty string will be returned.

Parameters

FileMask : A pattern that used to filter the files that are shown and can be selected. If this is empty the default '*.*' is used.
FileName: The pre-entered filename to save as. This can still be changed by the user in the dialog.

Notes

This method is only available in the EciCloud!!
When used in an on-prem version of Bemet, it will return an empty string, and write an error to LastErrorString.

Code example

Dim Result As String = PDC.App.SaveFileDialog(tbFileMask.Text, tbFileName.Text)

Availability

Available since march 2023. Bemet 2023R2 and higher.