Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2012, 11:51 AM
MarcoRu78 MarcoRu78 is offline
Junior Member
 
Join Date: Jun 2012
Posts: 2
Default Problems with TIWProgressBar refresh

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.
Reply With Quote
  #2  
Old 06-18-2012, 07:13 PM
Ouiji Ouiji is offline
Senior Member
 
Join Date: Nov 2001
Location: US of A
Posts: 478
Send a message via AIM to Ouiji
Default

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.
Reply With Quote
  #3  
Old 06-19-2012, 01:12 PM
MarcoRu78 MarcoRu78 is offline
Junior Member
 
Join Date: Jun 2012
Posts: 2
Default

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.
Reply With Quote
  #4  
Old 06-20-2012, 02:54 PM
Ouiji Ouiji is offline
Senior Member
 
Join Date: Nov 2001
Location: US of A
Posts: 478
Send a message via AIM to Ouiji
Default

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.
Reply With Quote
Reply

Tags
intraweb, iwprogressbar

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 08:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.