PDA

View Full Version : اضافه کردن Progress bar در StatusBas



etedali
چهارشنبه 27 شهریور 1387, 13:53 عصر
چطور میتونم در Status bar از یک Progress bar اضافه کنم کد زیر را هم پیدا کردم اما کار نداد

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;

Touska
چهارشنبه 27 شهریور 1387, 14:17 عصر
به روش زیر با مثال :

http://delphi.about.com/library/weekly/aa030805a.htm

موفق باشید :)