i want to create a color progress bar in delphi language within use by XPMan component (it is : with win xp style).
what do i do?
what cod开发者_JS百科e using?
With themes enabled you cannot change the color of the progressbar. With themes disabled you can change the color by sending a PBM_SETBARCOLOR message to the control.
Since you want a to change the color of your themed progressbar, you have to do all the drawing yourself or use a 3rd party progressbar that mimics a themed progressbar where you can change the color.
Same opinion as The_Fox. If you want a free 3rd party, here is one : http://rmklever.com/?p=138
uses
commctrl
procedure TForm1.Button1Click(Sender: TObject);
begin
ProgressBar1.Brush.Color := clGreen;
SendMessage(ProgressBar1.Handle, PBM_SETBARCOLOR, 0, clYellow);
ProgressBar1.Position := 50;
end;
精彩评论