Can I pop up a dialog box from a thread?

I have a list of files that need processing.
I thought well, maybe I should process them in a threads run event.
But then I realized that for each file I might have to pop up a dialog box and get an response from the user. (Modally)
And then I wondered if i was actually allowed to do anything gui related …

Sub Run() // The event handler of the thread subclass on the main window? dim f as FolderItem while not me.terminated if me.UBound >= 0 f = me.TopElement if f.proptery = something then dim w as new MyDialogBox b=w.showModal Select Case b //determine which button was pressed. Case d.ActionButton //user pressed Save Case d.AlternateActionButton //user pressed Don't Save Case d.CancelButton //user pressed Cancel End select End If End If Wend End Sub

Not sure this will work…

No
No UI in threads - you’ll get an exception

What I would suggest is creating a list of these files that need a user request, then at the end of the thread display one dialog, listing all the files.