Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Process doesn't let me stop
Message
From
14/09/2001 16:02:56
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00556725
Message ID:
00556757
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
Does the LockScreen possibly interfere? You could remove it to try.

good luck


>Hi everybody,
>
>I have the following code in form.button click:
>
>set escape on
>on escape llEsc = .t.
>oProgBar = newobject('ProgBar','progbar.vcx')
>oProgBar.SetTitle('Calculating progress for Names parsing...')
>oProgBar.SetMessage('File '+dbf('BldMstr')+ " "+transform(m.lnReccount)+" records")
>oProgBar.SetRange(0, m.lnReccount)
>oProgBar.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)
>			oProgBar.SetPos(m.lnCount)
>			set message to '     Record #'+transform(m.lnCount) + m.lcMsgTail
>		endif		
>		owner1 = BldMstr.fullname1
>		owner2 = BldMstr.fullname2
>		ownrel = ""
>		stateuse = BldMstr.stateuse
>		Named = NamePrsr(@m.owner1, @m.owner2, @m.ownrel, m.stateuse, PROCESS_ENABLE)
>		select BldMstr	&& In case we're in the wrong area
>		if m.Named<>"F"
>			lnTally =m.lnTally+1
>		endif
>		gather fields owner1, owner2, ownrel, Named memvar
>	endscan
>	set message to 'Process is complete...'
>	if m.lnCount=m.lnReccount
>		oProgBar.SetPos(m.lnReccount)
>	endif
>	.lockscreen=.f.
>	oProgBar.release()
>	oProgBar=.null.
>	release oProgBar
>....
>NamePrsr is a quite long complicated program. I'm hitting ESC to terminate the process, but it doesn't want to terminate. Do you see a problem in the code above?
>
>Thanks in advance.
Previous
Reply
Map
View

Click here to load this message in the networking platform