ngomte
asked on
Multitasking and multithreading inVB
Hi Friends
I want to perform multitasking in my apllication.my requirement is like this.
i have to load image from database server and also perform validations.since loading image take too much time that I have to wait for it.i want to load Image in the backgroud processing so that Image gets loaded while validations complted.
can anyone help me.
i am using Vb6.0,oracle database server 8.1.7
Thanks and regards
Narendra
I want to perform multitasking in my apllication.my requirement is like this.
i have to load image from database server and also perform validations.since loading image take too much time that I have to wait for it.i want to load Image in the backgroud processing so that Image gets loaded while validations complted.
can anyone help me.
i am using Vb6.0,oracle database server 8.1.7
Thanks and regards
Narendra
there are many solutions to do threading in vb (http://www.google.com/search?q=vb+multithreading)
Create another project make it an axtiveX exe that runs the process you want to multitask. Put a timer on the form and set the interval to 1 in the timer event put set the timer to disabled that way your code will only execute once, then run the code you want closeing the form when it has finished. You can event put an event in that it calls when it has finished.
Create a public Procedure that loads the form and stores the variable you need then (hidden). modeless
In your original program add a reference to the 2nd (compiled) program and declare it with events then you call call the process and contine executing the code in you first project. when the secound projects timer event runs you multi-task process will begin. You should then be able to create as many references to the 2nd program and run multi tasks.
hope this helps
Create a public Procedure that loads the form and stores the variable you need then (hidden). modeless
In your original program add a reference to the 2nd (compiled) program and declare it with events then you call call the process and contine executing the code in you first project. when the secound projects timer event runs you multi-task process will begin. You should then be able to create as many references to the 2nd program and run multi tasks.
hope this helps
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks mdougan
Since unlike VC++ it is not possible to create thread in VB, you could tackle the scenario by creating an outproc server component( ActiveX exe) in VB which would be responsible for loading the image. Your loading component will be executing in different process space, so your application could run simultaneously.