Hi Carlos,
Thanks for your CTL32_Statusbar and CTL32_Progressbar classes. They are excellent add-ons to VFP. Here I'd like to report a problem after putting them into use in one of our applications.
I got user complaints as follows:
1. The application runs slower and slower
2. After running the application for a period of time, it fails to redraw its objects or is completely out of order.
I confirm the problem by running the following test code. In my tests, time consumed by one pass of the progressbar movement will increase gradually. When it is run over a number of passes (850 in my Virtual PC test and more in non-Virtual PC tests), the progressbar disappears completely.
This seems to a problem of the _Screen.StatusBar.ProgressBar.Visible=... lines because skipping these lines solves (or at least delays) the problem.
Clear All
Erase bartest.txt
_Screen.NewObject("statusBar",'ctl32_Statusbar','ctl32_statusbar.vcx')
_Screen.StatusBar.ProgressBar.Visible=.T.
#Define zRunVisibleLines 1
? 'Capslock to stop'
Capslock(.F.)
i=1
Do While !(Capslock(.F.) And MessageBox('Stop?',4+32)=6)
nTime=Seconds()
#If zRunVisibleLines
_Screen.StatusBar.ProgressBar.Visible=.T.
#Endif
For j=1 To 100
_Screen.StatusBar.ProgressBar.Value=m.j
Next
#If zRunVisibleLines
_Screen.StatusBar.ProgressBar.Visible=.F.
#Endif
s='Pass '+Transform(m.i)+': '+Transform(Seconds()-m.nTime)+Chr(13)
?m.s
StrToFile(m.s+Chr(10),'bartest.txt',1)
Inkey(.1)
i=m.i+1
EndDo
Could you advise if there is any mistake in my code or if there is any way to solve a problem?
Thanks,
Ben
>To anyone interested, I have just uploaded version 3 of ctl32_statusbar - A Status Bar Control Class For Visual FoxPro 9.
>
>This new version has many new features, like Click, RightClick and DblClick events, many bugs fixed and enhancements. Check the downloads section:
>
>
http://www.levelextreme.com/wconnect/wc.dll?2,54,33,29808>
>And the Home Page:
>
>
http://www.goyanet.com.ar/vfp/ctl32_statusbar/>
>Sexy pics
here,
here, and
here.
>
>Carlos