ISDBApplication::CommonDialog

From MediaMonkey Wiki
Revision as of 15:43, 4 November 2007 by Steegy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

CoClass SDBApplication, Interface ISDBApplication

Property Get CommonDialog As ISDBCommonDialog


Property description

Returns a SDBCommonDialog object that can be used 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 = "Mp3 files (*.mp3)|*.mp3|All files (*.*)|*.*"
dlg.Flags = cdlOFNOverwritePrompt + cdlOFNHideReadOnly
dlg.InitDir = SDB.IniFile.StringValue("Scripts", iniDirValue)
dlg.ShowSave

If Not dlg.Ok Then
  Exit Sub   ' if cancel was pressed, exit
End If

' Get the selected filename
Dim fullfile : fullfile = dlg.FileName