ISDBApplication::ApplicationPath: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{MethodDeclaration|SDBApplication|ISDBApplication|Property Get | {{MethodDeclaration|SDBApplication|ISDBApplication|Property Get CommonDialog As ISDBCommonDialog}} | ||
===Property description=== | ===Property description=== | ||
Returns the | Returns SDBCommonDialog object that can be used then to show load/save file dialogs. | ||
===Example code=== | |||
<source lang="vb">' Create common dialog and ask where to save the file | |||
Dim dlg | |||
Set dlg = SDB.CommonDialog | |||
dlg.DefaultExt='mp3' | |||
dlg.Filter=filter | |||
dlg.Flags=cdlOFNOverwritePrompt + cdlOFNHideReadOnly | |||
dlg.InitDir = iniF.StringValue( "Scripts", iniDirValue) | |||
dlg.ShowSave | |||
if Not dlg.Ok Then | |||
Exit Sub ' if cancel was pressed, exit | |||
End If | |||
' Get the selected filename | |||
fullfile = dlg.FileName</source> | |||
[[Category:Scripting|{{PAGENAME}}]] | [[Category:Scripting|{{PAGENAME}}]] |
Revision as of 13:27, 21 March 2007
CoClass SDBApplication, Interface ISDBApplication
Property Get CommonDialog As ISDBCommonDialog
Property description
Returns SDBCommonDialog object that can be used then to show load/save file dialogs.
Example code
' Create common dialog and ask where to save the file
Dim dlg
Set dlg = SDB.CommonDialog
dlg.DefaultExt='mp3'
dlg.Filter=filter
dlg.Flags=cdlOFNOverwritePrompt + cdlOFNHideReadOnly
dlg.InitDir = iniF.StringValue( "Scripts", iniDirValue)
dlg.ShowSave
if Not dlg.Ok Then
Exit Sub ' if cancel was pressed, exit
End If
' Get the selected filename
fullfile = dlg.FileName