I’m working on an application with three goals:
1. Present a status screen to user that is updated every 15 minutes.
2. Write data to Excel log file at each 15 minute interval.
3. Alllow user to click a button on the status form to refresh it at any time, independent of the 15 minute timer.
I’m using the Windows sleep() function to implement the 15 minute wait, and at this point I have a VB6 application that accomplishes the first two goals with no problem. However, I can’t do #3. If I show the userform modally, the app pauses when the form is displayed, which means that the sleep function is never called. On the other hand, if I show the userform modelessly, the sleep timer runs but the buttons on the userform are inoperable.
I suspect I'm missing a fairly simple technique...
I happen to have written the app in VB6 for unimportant historical reasons… can I do this sort of multithreading in VB6? Or do I need to move to .Net or something else?