I have a program that reads in large files. At the moment once a user selects the file to load the open file dialog box stays on the screen and the program looks like its crashed until the file has finally been read. I have set up a label to display the loading progress on the main form, but this is never seen because the open file dialog doesn't dissapear.
I guess what i'm asking is:
Is there a way to make sure that the open file dialog has closed, and that the main form has focus before moving onto the next function?
Dim file As String = Me.OpenFileDialog1.FileName
to no avail.
I've also tried doing an infinite loop until the filename is nothing, or until the file dialog is nothing. Neither worked.
Any suggestions gratefully received.