![]() |
|
#1
|
|||
|
|||
|
Hello everyone, I'm having a problem with TIWProgressBar. I am developing an application with Delphi2009 and IW10. The problem I have is the following. In my application after the press of a button, a query is executed (qry.Open). Because it takes a bit, I want to show something to show that the query is in progress. The problem is that if I use a TIWTimer and increase the progressbar in the event of the timer don't work, everything remains locked until the query ends. Does anyone have any idea how to refresh the TIWProgressBar while executing the query? Maybe with a little example of code? Thanks in advance.
|
|
#2
|
|||
|
|||
|
Have you tried adding an "Application.Processmessages" in the code with the timer to update the progressbar? Without that call, sometimes the application will not "Redraw" while it is processing a long event. Just a thought.
__________________
"not quite smart enough to be dumb" Extended Stats No Longer Available Due To Changes To The Forum.
|
|
#3
|
|||
|
|||
|
The problem is that when I do query.Open, the timer don't work. Until query is not executed, no control is returned. If I put "Application.Processmessages" in timer event is useless because is not executed until query is finished.
|
|
#4
|
|||
|
|||
|
If something like
While qry.Open do begin TIWProgressBar.Step; application.processmessages; end; [Don't use that as a final solution, as it is about as bad as it gets, but it should let you know if you can process events while query is running, at least without threading the query call] Also, Which component set are you using to call the query? Is this to a local DataStore? Or does this go out too a database like MySql? And do you have access to the sources to the query procedure? Or there are always the Marquee ProgressBars which scroll without a final value for when you do not know it, most are coded to be threaded so you do not run into this.
__________________
"not quite smart enough to be dumb" Extended Stats No Longer Available Due To Changes To The Forum.
Last edited by Ouiji; 06-20-2012 at 03:00 PM. |
![]() |
| Tags |
| intraweb, iwprogressbar |
| Thread Tools | |
| Display Modes | |
|
|