Color for the progressbar

micro

Well-Known Member
Licensed User
Longtime User
Hi to all,
how can i change the color of progressbar (ControlEx of Agraham)?
(Default color is blue)
It's possible with DoorEx library?
Thanks
 

agraham

Expert
Licensed User
Longtime User
Try this. Obj1 and Obj2 are Door library objects, Pbar is a ProgressBar. You can't change the colour if visual styles are enabled.

B4X:
Obj1.New1
Obj2.New1
Obj1.Value = Pbar.ControlRef
Obj2.CreateNew("System.Drawing.Color" & Obj2.System_Drawing)  
Obj1.SetProperty2("ForeColor", Obj2.RunMethod2("FromArgb",cRed,"System.Int32"))
' you can also set the ProgressBar style. Blocks=0, Continuous=1, Marquee=2
' the Marquee style is valid only when visual styles are enabled.
' the Continuous style is valid only when visual styles are Not enabled.
' FormExDesktop lets you enable visual styles
Obj1.SetProperty("Style",1)
 

micro

Well-Known Member
Licensed User
Longtime User
Hi agraham
but the change ForeColor is only for desktop?
Because on the device not work, the color is always the same (default forecolor)
I can not use your library Formex because it is an old project that uses FormLib, how can I change the properties VisualStyles?
Thanks.
 
Top