Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Showing a modal progress bar
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00616707
Message ID:
00617328
Views:
27
>>Move your code to the modal form :-)
>
>Well that would work, once. Not to reusable though, eh. ;-)

Recipe for a reusable, modal progress box.

Create a modal form with a property (nCount) with an assign method and a property (sExecute) which will hold the procedure-name you want to execute.

The assign code should renew the display and refresh the screen.

Create an init for the form which accepts a parameter to set the sExecute to and then executes the procedure (via, say, &x)

In your calling routine, use:
PUBLIC o
PROCEDURE starttest
	DO FORM fprogress NAME o LINKED WITH 'doTest()'
endproc
The actual procedure would be something like:
PROCEDURE doTest
LOCAL i, j
  FOR j = 1 TO 100
	FOR i = 1 TO 100
		o.nCount = i
	ENDFOR
  endfor
endproc
This will work (I just tried it with a simple counter).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform