Examples Delphi

Title: How to Add a progressbar to a statusbar
type
THackControl = class(TControl);
procedure TfrmWebsite.FormCreate(Sender: TObject);
var
PanelRect: TRect;
begin
// Place progressbar on the statusbar
THackControl(ProgressBar1).SetParent(StatusBar1);
// Retreive the rectancle of the statuspanel (in my case the second)
SendMessage(StatusBar1.Handle, SB_GETRECT, 1, Integer(@PanelRect));
// Position the progressbar over the panel on the statusbar
with PanelRect do
ProgressBar1.SetBounds(Left, Top, Right - Left, Bottom - Top);
end;