SteliosGietos
How can I prompt a user dialog for files selection like API function GetOpenFilename?
I want the use to select some images but not to open them... just to get an array list with their filenames.
Mediacy.Controls.Common.Vb.MCFileOpenDialog raises an error when select more than one file.
Thanks...
I want the use to select some images but not to open them... just to get an array list with their filenames.
Mediacy.Controls.Common.Vb.MCFileOpenDialog raises an error when select more than one file.
Thanks...
0
Answers
If you want to show Open file dialog, then the standard OpenImage command will work, just leave FileNames property empty and the a prompt will be shown:
If you want to enumerate files in a folder and get names, then you can use standard .NET functions, such as EnumerateFiles:
Public Sub GetListOfFiles Dim folder As String="D:\Images" 'change to your own folder Dim files=System.IO.Directory.EnumerateFiles(folder,"*.tif") For Each file As String In files Debug.Print (file) Next End Sub
Regards,
Yuri
Your examples helped me a lot.