其中Progress: TProgressBar;在TForm1 = class(TForm)中定义
function TForm1.CreateProgress():boolean;
var
   staPanleWidth:integer;
begin
 progress:=TProgressbar.create(form1);
 staPanleWidth:=statusbar1.Panels.Items[2].width;
 statusbar1.Panels.Items[2].width:=150;
 statusbar1.repaint;
 with progress do
  begin
    top:=StatusDrawRect.top;
    left:=StatusDrawRect.left;
    width:=StatusDrawRect.right-StatusDrawRect.left-2;
    height:=StatusDrawRect.bottom-StatusDrawRect.top-2;//设定进程条的宽
    visible:=true;
    Parent := statusbar1;
  end;
statusbar1.Panels.Items[2].width:=staPanleWidth;
  result:=true;
end;procedure TForm1.DrawProgress(stepvar :integer;stop:boolean);
begin
  progress.Step:=100 div stepvar ; //进程条的步长
     if not stop then
        progress.StepIt;// 进程条累加
     if stop then
       progress.Free;end;

解决方案 »

  1.   

    当然可以。你参照任何一个.pas文件里的语法做就行了!
      

  2.   

    procedure TForm1.Button2Click(Sender: TObject);
    Var
       Button:Tbutton;
    Begin
       Button:=Tbutton.Create(self);
       Button.parent:=Form1;
       Button.left:=0;
       Button.top:=0;
       Button.caption:='OK';end;
      

  3.   

    statusbar1 := TStatusBar1.Create(Application);
    statusbar1.height := 20;
    statusbar1.Panels.Items[0].Text := '';
    statusbar1.Panels.Items[1].Text := '';注意最后要释放内存:
    statusbar1.Free;
      

  4.   

    可以
    你看看一位大哥给我的代码
    procedure TForm1.FormCreate(Sender: TObject);
    begin
     MailServ :=TMailSlot.Create(self);
     MailServ.OnReceiveData := RevData;
     MailServ.CreateSlot('\\.\mailslot\Test');
     MailServ.Active :=False;end;
    其中mailslot是一个控件
      

  5.   

    http://www.china-crane.com/vba_excel/gzt.zip这里有工资条的控件