How do I make a VB Application multi-threading?? I need to do a few tasks at the same time. I have an Smart Card based application, which includes a LiveUpdate module (something like NAV LiveUpdate).
Now..if I run liveupdate, and if there are updates to the application available, the update download will take about 5 minutes. And if I put the LiveUpdate (LU) routines in a module, the application will not respond to any other events, until the LU procedure exits.
I want the application to check for updates every time it comes up (as in Form_Load or at predetermined intervals). The problem here would be that if there 'are' updates available, the users will NOT be able to use the application until LU has finished executing. So..I need to execute the LU in another thread so that the application will complete the form_load event and wait for other events (while LU executes in the background).
Dun worry about other issues such as checking for active internet connections and timed-out by LU procedure. I've already taken care of that. I just need some codes on multi-threading. I know there are some API for threads (CreateThread and TerminateThread) in 'kernel32', but how do I call them???
Can you help?? A complete AND working code would be nice. Thanks..
I'll come back and check again in a few days. This will give you 'experts' some time to apply your 'grey matter' to the task...:)