Welcome
Welcome to ctl32

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!

ctl32_statusbar disables my own progressbar

ctl32 related questions

ctl32_statusbar disables my own progressbar

Postby foxdata on 17 Sep 2009, 07:03

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
foxdata
 
Posts: 1
Joined: 17 Sep 2009, 06:43

Return to ctl32 general

Who is online

Users browsing this forum: No registered users and 0 guests