Change color in a progress bar

2220

Member
Licensed User
Sorry in Advance, i'm new in B4P and don't know the tricks, yet.

I'm not able to change the color bar of my progress bar created in runtime. I need some help.

Another question.
How can I set parent to a panel when I create the Progressbar in Runtime?

Joan
 

Cableguy

Expert
Licensed User
Longtime User
Are you using the controlEX dll?
If so, from it's help file:
progressBar1.New1("Form1",10,10,200,30)

Form1 is the parent of the created Progressbar1...
But if you need to create more than one progressbar, just add the object to the object collection and create the control only when needed, or if you just want to change the one you created to anothet form, then the easy wasy would be to dispose the progressbar and create a new one....

XIIIIII Just noticed that progressbar does NOT have a dispose method, (will be added in a future dll update???)...
so you need to add the formlib dll and use the changeparent method for that...


PS:EREL has beaten me to the clock....;)
 
Last edited:

Zenerdiode

Active Member
Licensed User

Attachments

  • ProgDisp.JPG
    ProgDisp.JPG
    14.6 KB · Views: 186

Cableguy

Expert
Licensed User
Longtime User
I'm still using 6.30 and the default dlls taht came with it...what are you using, is this your own dll?
Dispose wouldn't be that hard to add to the dll, but i've had some heat for messing with someone else's dlls...
 

Cableguy

Expert
Licensed User
Longtime User
Hi Paulo,

I tried it in B4PPC V6.30. It works !

The parameter is not explained in the help file. But it exists.
If you write the name of the progressbar and the dot, the Dispose property will appear.

Best regards.

I only looked at the help file, thanks for the explanation,Klaus...
 

Zenerdiode

Active Member
Licensed User
Sorry Paulo, I forgot to mention (however, Klaus did :)) that I was using the native ControlsEx Library.

I'm using the .dispose methods for all objects in Form1_Close because I've had problems with the Serial2.dll before - I exited from my app and could not restart it until I had done a soft reset on the device.
 
Top