Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to force a screen repaint during a long query?

Status
Not open for further replies.

fluteplr

Programmer
Oct 23, 2000
1,599
0
0
US
The problem is this, we have a few places in the app. where the user can run a query that may take a while, like 90 secs.

The application is client server with sql 2000 back end, we are doing sqlexecs in this particular case.

If while they are waiting they pop another application over ours, the screen goes stupid and does not repaint until the query is done. This seems to bother people.

I have tried adding a timer that gets enabled just before the query to force a doevents every 1 sec while the query is running. This seems to have no affect. I have also tried playing with the autoyield settings also no affect.

I could probably go to an async connection but for various reasons I would like to avoid that if there is another solution to what is basically just a visual issue.

Any ideas out there.

Jacob Bruner
Healthcare Insights


 
you may try this (VFP8 or above):

Code:
Public goScreenevents
goScreenevents = CreateObject("screenevents")
Bindevent(_screen,"click",goScreenevents,"screenclick")

Define Class screenevents as Custom
    Procedure screenclick()
       _Screen.Cls()
       _Screen.Draw()
    EndProc
EndDefine

Now a click on the vfp _screen should trigger a complete redraw. Disadvantage: a click on the _screen, not on the form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top