|
-
Jul 4th, 2003, 12:14 AM
#1
Thread Starter
Member
-
Jul 4th, 2003, 01:03 AM
#2
Frenzied Member
True Multithreading in VB6 is a pain.. although i tried a lot of APIs for doing this.. but cudn't succeed.. there is an api named createThread but it doesn't seem to work...
to prevent halting u can use DoEvents keyword in the code where u are generating document. Also u can have a global variable.. whose value u will change when user clicks on CANCEL button.. and in the generation code u check it's value if it's changed cancel the process...
This is a workaround only..
-
Jul 4th, 2003, 01:20 AM
#3
PowerPoster
put the code of generating the document in the timer control event.
The first line shd disable the timer so that it does not occur again
also the globla variable can exit the procedure
-
Jul 4th, 2003, 02:24 AM
#4
Thread Starter
Member
and how can we handle interupts
-
Jul 4th, 2003, 02:35 AM
#5
Hyperactive Member
VB can do multithreadding. Not well, but it can do it using ActiveX EXE's.
Peeman.

Best Bar.....
-
Jul 4th, 2003, 03:44 AM
#6
PowerPoster
For interrupts( if u want to cancel the report before its completed)
Make a property of the form ( which is got the timer)
and maybe in another form where u have the cancel button or maybe on the same form (in which u neednt make a property)
Well, keep a form level variable say blnCancel, keep this false and on click of the cancel then make it true....in the code which u r running just keep checking for the value of this variable and exit the sub if its true
-
Jul 5th, 2003, 08:02 AM
#7
Frenzied Member
Originally posted by veryjonny
put the code of generating the document in the timer control event.
Timer control doesn't provide multithreading.. check it....
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
|