|
-
Mar 30th, 2006, 02:42 AM
#1
Thread Starter
New Member
[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.
Last edited by Hack; Mar 30th, 2006 at 10:47 AM.
-
Mar 30th, 2006, 02:44 AM
#2
Re: Common Dialog Box Won't Close Until File Done Reading
have you given DoEvents statement next to the command dialog open statement
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Mar 30th, 2006, 02:46 AM
#3
Re: Common Dialog Box Won't Close Until File Done Reading
Post your code. Its easier to see where the problem may be.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 30th, 2006, 04:12 AM
#4
Thread Starter
New Member
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.
Last edited by RickB2006; Mar 30th, 2006 at 04:21 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|