|
-
May 18th, 2007, 11:31 AM
#1
Thread Starter
Hyperactive Member
ProgressBar with dll/class function
Hi.
I have an app. that uses a function. This function returns an integer value of processed documents. So, my problem is: I use a ProgressBar to show the number of processed documents.
Code:
Proc.ProgressBar1.Value = Motor.Process(... ... ...
The "Motor.Process" function is returning integer values but I can't refresh the progress bar. I'm using DoEvents before and after the function call.
Thanks
-
May 18th, 2007, 11:48 AM
#2
Re: ProgressBar with dll/class function
Is this part of a loop - the function being called multiple times, with the return value increasing each time?
What is the Maximum value for the Progressbar? If it is too high, you wont notice the difference until many documents have been processed.
Try using this (after setting the value) to force a re-draw:
Code:
Proc.ProgressBar1.Refresh
DoEvents
-
May 19th, 2007, 01:24 PM
#3
Thread Starter
Hyperactive Member
Re: ProgressBar with dll/class function
The number of documents may vary, from 1 up to 20
I've tryed the refresh before and after, but it won't work as expected.
-
May 19th, 2007, 01:29 PM
#4
Re: ProgressBar with dll/class function
By definition, it could only work after.
To be able to work out why it isn't working.. What are the answers to my questions?
-
May 19th, 2007, 01:41 PM
#5
Thread Starter
Hyperactive Member
Re: ProgressBar with dll/class function
Sorry...
Let me explain you how the dll function works.
I'm sending an adodb.Recordset to the dll. There, I execute a loop (for processing all rows in my RS). While the dll is processing the entire RS, I return to the function the number of RS rows processed:
Code:
i = i + 1
class1.Process= i
In my app I call the function only 1 time.
Thanks.
-
May 19th, 2007, 01:50 PM
#6
Re: ProgressBar with dll/class function
Ok... you call the function once, and the value gets returned when the function is finished.
By definition, your program cannot know the progress, or run any other code.
Without making major changes to the code (in this program and/or the DLL), there is no way of adding any kind of progress indicator.
-
May 19th, 2007, 01:53 PM
#7
Thread Starter
Hyperactive Member
Re: ProgressBar with dll/class function
Ok, I'll accept that.
I'll try using that avi of copying files.
Thanks.
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
|