Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Common Controls library from Alexander Grigoriev
Message
From
30/07/2001 15:30:05
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00537238
Message ID:
00537416
Views:
12
You're welcome. Alexander's class is quite nice, and provides for both smooth and segmented progress bars. His documentation tells how to choose the style you prefer. And yes, my file has a sample program, too.

>Rick,
>
>Thanks a lot, I'll look into it. Basically, my problem is, that I need to instantiate it without form (from the program, which makes a long process, like scan.. endscan). The progress bar, we're currently using (from _ftc library, I believe) has a strange bug: instead of showing the whole process, it always stoped at 99% and it also not completely filled. Also I found, that I can not remove it untill table update finishes its work.
>
>The other requirement, I have, it should allow termination by ESC. Here is a sample code using our thermometer class:
>
>select Bldmstr
>lnReccount=reccount()
>lnCount=0
>lcMsgTail = "/" + transform(m.lnReccount) + ".  Wait or press Esc to cancel ..."
>* -- Checking all the records in BldMstr one at a time
>select BldMstr
>set order to
>curEsc = set ('escape')
>lcOnEsc=on('escape')
>set escape on
>llEsc= .f.
>on escape llEsc = .t.
>loTherm = newobject("thermometer", "wg","","Calculating Progress for:" + m.lcTitle, ;
>	m.lnReccount)
>loTherm.show()
>with thisform
>	.lockscreen=.t.
>	
>	scan
>		if m.llEsc and .NiceEsc()
>			exit
>		else
>			llEsc = .f.
>		endif
>		lnCount=m.lnCount+1
>* -- Updating the percentage bar
>		if mod(m.lnCount,100) = 0 or (m.lnCount>=m.lnReccount-10)
>			loTherm.update(m.lnCount)
>			set message to '     Record #'+transform(m.lnCount) + m.lcMsgTail
>		endif
>		
>		do case
>		case m.tcMode = "Parse Situs"
>			.ProcParse(m.tcMode, m.llProgramExists)
>
>		case m.tcMode = 'Parse Owner'
>			.ProcParse(m.tcMode, m.llProgramExists)
>
>		case m.tcMode = 'ResOwner'
>			.ProcResOwner()
>
>		case m.tcMode='Auto Situs'
>			.AutoAddrSitus()
>
>		case m.tcMode='Auto Owner'
>			.AutoAddrOwner()
>		endcase
>	endscan	
>	set message to 'Process is complete...'
>*!*	loTherm.complete()
>	if vartype(loTherm)='O'
>		loTherm.release()
>	endif
>	release loTherm
>
>I want to have progress bar SMOOTH and a percentage label inside the progress bar (9). Does your file have a sample program?
>
>Thanks again for the response.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform