Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's The Advantage & Disadvantage of DoEvents?

Status
Not open for further replies.

MrVB50au

Programmer
Mar 16, 2003
326
AU
My program uses an INI file format to save a file for opening when needed, but the user doesn't see INI when viewing the saved file in Windows Explorer, the file extension had been changed to EBC.

Now, The problem I seem to have is that, since the GetINI procedure has all the loading functions to load the saved file, the extension from EBC is changed back to INI and the INI file is then loaded. GetINI is a huge procedure and though I've tried my darndest to work it out, the saved file that is being opened, doesn't seem to want to impliment all the settings on screen.

Should I try and break each section of the GetINI into different procedures and simply call each one from GetINI and use the DoEvent function between each call? or should I try using a Timer control and trigger it after each call?

Any suggestion would be greatful.

Andrew.
 
Have you tried running the procedure from an ActiveX EXE component? That way the task can continue completely independent of your application (in it's own thread), and the operating system can take care of multitasking. Thus avoiding the need for DoEvents in your app.

zemp
 
Zemp

I havn't used ActiveX EXE before, how will I create it and once created, how to use it?

Andrew.
 
It is pretty much the same as a dll (activeX dll) execpt you you select the correct project type (Active X EXE) in VB when you start. I would create a project group that has both your main app and the Active X exe in it. Then you need to reference the ActiveX exe project from your main app. The ActiveX exe will need a class that you can instantiate and call from your main app (it should be created automatically).

Check the help files and msdn for more specific and detialed information.



zemp
 
ok, thanks zemp.

I'm half way there now.

Andrew.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top