Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
StefanoUd70
2 discussion posts
I need to create a function that lists the names of all the files (perhaps using wildcards) contained in one folder.
Is it possible? Any suggest please?
In Visual Basic if possible
Thank you
Oct 16, 2018  • #1
User Image
StefanoUd70
2 discussion posts
I succeeded in solving my question: this is the code, perhaps it could be useful to somebody:

Imports System
Imports System.Drawing
Imports System.IO

' The 'windowHandle' parameter will contain the window handle for the:
' - Active window when run by hotkey
' - Trigger target when run by a Trigger rule
' - TitleBar Button owner when run by a TitleBar Button
' - Jump List owner when run from a Taskbar Jump List
' - Currently focused window if none of these match
Public Class DisplayFusionFunction

Public Shared Sub Run(ByVal windowHandle As IntPtr)
Dim myFilesArray() as String
Dim myFileName as String
Dim B as Boolean

B = False


While not B
myFilesArray = directory.getfiles("put the folder path here")
For Each myFileName in myFilesArray
BFS.Dialog.ShowMessageInfo(myFileName)
Next

B = BFS.Dialog.GetUserConfirm("Stop the application?")
End While

End Sub

End Class
Oct 17, 2018  • #2
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)