|
-
Apr 23rd, 2000, 03:05 PM
#1
Thread Starter
Member
hi.
if i create a class in a diffrent thread..
with "CreateObject"
how can i call the method of this class ...
in a async mode...
( non-block)
this mean..calling to method and immediatly return and continute to excute code...
while in the other thread the method is executed in the same time.
-
Apr 24th, 2000, 12:11 AM
#2
Frenzied Member
I think you need the function in the class to set a timer and then return, when the timer calls the function back d what the function needs to do and either call back the calling thread or raise an event.
-
Apr 25th, 2000, 06:45 AM
#3
New Member
Why don't you make your class as ActiveX exe. This way it
will run in its own thread and won't block your application
from running. Within this ActiveX exe you could include an
event(s) which notify client application of success/failure/progress/completion of task.
I wish you the best.
-
Apr 25th, 2000, 07:10 AM
#4
Frenzied Member
Sorry, I meant to say what Tom said aswell, the trouble is if you call a function from an activeX exe Vb waits until the function has finished until it resumes the thread, that's why you have to use the funny timer technique. It's quite hard to get the timing right though if what you're doing in the other thread is critical, a lot of the time the calling thread will finish everything it needs to do and just go on without the critical process in the other thread, causing all sorts of crazy side effects.
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
|