I have my own progresssbar on my form. And it worked properly BEFORE I started to use ctl32_statusbar in my app. However, since I used ctl32_statusbar with code _Screen.Newobject("oStatusBar","ctl32_statusbar", "ctl32.vcx", .Null., 5), my own progressbar now does NOT work any more.
You could easily reproduce the problem.
1. create a statusbar on start of with the cod: _Screen.Newobject("oStatusBar","ctl32_statusbar", "ctl32.vcx", .Null., 5)
2. Create a form with VFP, set its width to 550
3. Put a Container on the form, suppose the container has the name of 'myBar', set its Left to be 10, set its width to be 10
4. Set the Backcolor for the Container 'myBar' to be RGB(0,255,0), green color.
5. Put a commandbutton on the form
6. In the Click event for the commandbutton, put the following code:
FOR m.lnNow=1 to 10000
THIS.PARENT.myBar.width=0.05*m.lnNow
ENDFOR
7.Click the button. You will notice that the Container myBar is frozen there with its original width of 10, and it does NOT become resized even though the FOR/ENDFOR loop reset its width gradually. Only after the loop completes, the Container myBar will directly display with a final width of 500.
But if you do NOT create a statusbar with the class ctl32, the loop works well and the Container myBar could gradually display the whole process of resizing that is controled by the loop.
Does it have anything to do with BINDEVENTS used in the class? Or what is the real cause?
BTW, I think the ctl32 class is very good in general and provides lots of good functions.
Best Regards,
Mike
