Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from - is it possible to add progress bar
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00450093
Message ID:
00450504
Views:
30
Hi Nadya,

Here's a method I've used before:
* ThisForm.ImportFile() Method

	Thisform.cntBar.width = 0 			&& Container object used as thermometer

	=thisform.getfsize(thisform.txtFileName.value)
	Append from (thisform.txtFileName.value)  delimited with " for thisform.increment()

* ThisForm.GetFSize() Method"

	Parameter cFileName
	Set deci to 17
	fh 		= fopen(cFileName,10)		&& Open the file
	nEnd 		= FSEEK(fh, 0, 2) 		&& Move pointer to EOF
	=fclose(fh)					&& Close the file
	fh 		= fopen(cFileName,10)		&& Open the file
	nRec 		= len(Fgets(fh))		&& Get record size
	=fclose(fh)					&& Close the file

	nBarMax 	= thisform.pageframe1.pgUpdate.cntStatus.width -2
	Thisform.nBarIncr	= nBarMax/(nEnd/nRec)	&& Calc and store increment value
	Return .t.

* ThisForm.Increment() Method

	Thisform.cntBar.width = thisform.cntBar.width + thisform.nBarIncr
>Hi everyone,
>
>Just curios, is it possible to add thermometer during Append From (txtFile) type delimited? I just appended 5mln. records text file and it was not user friendly to see just wait window (fortunately, nobody except me has seen this :))
>
>Thanks in advance.
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform