I'm working in C# VS 2012. I want to be able to have an event for a FileDialog that once the user chooses a file some code is run. So it would be something like once the filedialog is closed the code will run. If anyone can lend any help that would be great.
Well, by default, showing the dialog is modal, i.e., your thread is effectively halted until the dialog is closed. So, just Show()
it and any code after that call will be run after the window closes. You can get the chosen file(s) via the FileName
property (or FileNames
property if MultiSelect
is set to true
).