Home > database >  Consult the problem of dynamic progress bar? How to implement
Consult the problem of dynamic progress bar? How to implement

Time:10-12

There are two Windows, a main window, display data, the other is a progress bar window

I want to retrieve the main window at the same time, the progress bar window dynamic display query time (or dynamic progress bar), but found that can only wait for after completion of the main window retrieve, progress bar window will begin to perform the timer events

The main window
Dw_2. Settransobject (sqlca)
Open (w_hpb_test)
W_hpb_test. Of_start ()
Dw_2. Retrieve ()
===================================================
The progress bar window
Of_start function:
Timer (1, this)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Open event:
Hpb_1. Maxposition=100
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The timer events:
If il_pos & gt; .=hpb_1 maxposition then
Il_pos=0
End the if
Il_pos + +
Hpb_1. Position=il_pos

CodePudding user response:

Please find on the dw_2 RetrieveRow events, each time it to retrieve a row trigger,
Returns 0 means continue,
Return 1 said to stop searching

CodePudding user response:

Unless necessary will lower speed

CodePudding user response:

Indeed,
Are there any other method besides retrieverow this way, I hope to use a timer to solve,,,

CodePudding user response:

Single thread bad ah, retrieve data when the UI thread is blocked
  • Related