Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Controls go blank during processing
Message
From
23/06/2008 09:25:20
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01326002
Message ID:
01326101
Views:
19
Sergey, thanks for another great idea to solve my problem. Unfortunately, I do not use VFP nearly as much as I used to and have never used BINDEVENT(). I did look a the solutions samples you mentioned but not sure I have it right. This is what I think needs to happen can you tell me if this is correct.

1.) Inside the LOAD event of the form I want to show put in this code (not sure if _VFP.hWnd should be in 1st param)
BINDEVENT( _VFP.hWnd, WM_ACTIVATE, ThisForm, "refresh" )

2.) Inside the UNLOAD event
UNBINDEVENT( _VFP.hWnd, WM_ACTIVATE )

Is that it? Are the BINDEVENT and UNBINDEVENT calls in the correct place such that when I begin the intensive app it appears, I click on another window (say IE) then click back I will get my form to show the status instead of a blank screen as it is now?

>You can use BINDEVENT() to bind to Windows messages to catch your application activation and refresh the form. The sample code that comes with VFP9 shows how to bind to Windows messages.
>
>>I have a very intensive 30+ minutes process that downloads five large tables (a few over 500K rows) via ADO then drops them into Excel's pivotcache object. In order to reveal the status to the end user, I created a form that contains a grid that is used to show the status such that task 1 (download table 1) is complete.
>>
>>I am running the process now and when I switched to another app (such as the UT) and come back to my program the form appears but it is all blank. I can no longer see the grid that is attached to the form at all.
>>
>>I suppose I need to call a form refresh or paint but how can I do that when all the processing cycles are involved in an intensive process? Can I do something like a click event on the form to refresh itself or will that be ignored when the program is running since all resrouces are assigned to the table download? Is there a way around this sitution? If not, all my work to create a form with a grid to show the status is probably a waste of time...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform