[RESOLVED]Common Dialog Box Won't Close Until File Done Reading
I am having a problem with VB6 in which a Common Dialog Box won't close until after a file has finished being read.
The user selects a file to read into an array using a Common Dialog Box and they choose "open". Instead of immediately shutting down the Common Dialog Box will stay open until after the file is read.
Visual Basic 6 seems to give priority to file operations and won't give the Common Dialog Box a chance to shut down before moving on and reading the file. Since the file I am trying to read is rather large the program just sits there with the Common Dialog Box open until it is done reading. The user of the program will think it has crashed.
I have also tried creating a progress bar but the Common Dialog Box stays open regardless.
Any suggestions? Thanks in advance.
Re: Common Dialog Box Won't Close Until File Done Reading
have you given DoEvents statement next to the command dialog open statement
Re: Common Dialog Box Won't Close Until File Done Reading
Post your code. Its easier to see where the problem may be.
Re: Common Dialog Box Won't Close Until File Done Reading
Wow, I can't believe I never came across the "DoEvents" issue before! That fixed the problem nicely.
Thanks ganeshmoorthy! Thanks also RobDog for also trying to help.