Scalabium Software

SMReport Autogenerated
Knowledge for your independence'.
Home Delphi and C++Builder tips


#138: How can I change color of standard TProgressbar?

Standard TProgressbar component from Win32 palette doesn't allow to change a color of progress using properties but control from MS Windows allow to do it (TProgressbar is not pure VCL component - this is a wrapper for Windows control, the same as TEdit, TStaticText, TButton etc)

This feature can be easy added in run-time - just call the next procedure and define parameters - your Progressbar and desired color:

procedure ChangeProgressColor(pb: TProgressbar; cl: TColor);
const
  PBM_SETBARCOLOR = WM_USER+9;
begin
  inherited;

  SendMessage(pb.Handle, PBM_SETBARCOLOR, 0, cl); 
end;

For example:
ChangeProgressColor(pbStatus, clRed);


Published: April 4, 2002

See also
 
ABA Database Convert
MAPIMail
Paradox ActiveX
Mail parser (ActiveX)
SMReport
SMDBGrid
DBExport tools
Paradox to MS Access converter
Protected Storage Viewer
Viewer for TNEF-files (winmail.dat)
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2017, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport advertising