怎么让启动窗体中的Label字体来回改动??
启动窗体就象Word之类的启动界面,如何实现在启动窗体中
Label显示诸如“正在初始化”,然后显示“正在生成文件”等等
直到主窗体显示出来

解决方案 »

  1.   

    试试
    Label.Caption:='...';
    Form.Refresh;
      

  2.   

    在他在不同的时间有不同的CAPTION值就可以了
      

  3.   

    Lable.Caption:='';
    Form.Refresh;
    应该可以
      

  4.   

    Application.Initialize;
      
      SplashForm := TSplashForm.Create(Application);
      SplashForm.Show;   // Display the splash screen
      SplashForm.Update; // Update the splash screen to ensure it gets drawn  { This while loop simply uses the TTimer component on the SplashForm
        to simulate a lengthy process. }
       while SplashForm.tmMainTimer.Enabled do
        Application.ProcessMessages;
    ......
      // SplashForm.FormStyle:=fsNormal;
      SplashForm.Hide;  // Hide the splash screen
      SplashForm.Free;  // Free the splash screen
      Application.Run;在splash窗口中
    procedure TSplashForm.FormActivate(Sender: TObject);
    var
    Height,Width:Integer;
    h,w:real;
    begin
     Width  := Screen.Width;
     Height := Screen.Height;
     w:=Width;
     h:=Height; splashform.FMmc.font.Size:=16;
     splashform.FMmc2.font.Size:=16;
     splashform.FMmcb.font.Size:=16;
     splashform.FMmc2b.font.Size:=16; if Width>640 then
       begin
         splashform.FMmc.font.Size:=24;
         splashform.FMmc2.font.Size:=24;
         splashform.FMmcb.font.Size:=24;
         splashform.FMmc2b.font.Size:=24;
       end;
     if Width >800 then
       begin
         splashform.FMmc.font.Size:=32;
         splashform.FMmc2.font.Size:=32;
         splashform.FMmcb.font.Size:=32;
         splashform.FMmc2b.font.Size:=32;
       end;
      splashform.Height :=trunc(H*0.5);
      splashform.Width := trunc(W*0.6);
      with splashform do
      begin
        Left := (Screen.Width - Width) div 2;   // 在水平方向上居中显示。
        Top:= (Screen.Height - Height) div 2;
        FMmc.Left := (Width - FMmc.Width) div 2;
        FMmcb.Left := ((Width - FMmc.Width) div 2)+1;
        FMmc2.Left := (Width - FMmc2.Width) div 2;
        FMmc2b.Left := ((Width - FMmc2.Width) div 2)+1;
      end;
    end;
    end.
      

  5.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      label1.Caption := 'step 1, please wait 1 seconds!';
      label1.Refresh;
      Sleep(1000);
      label1.Caption := 'step 2, please wait 2 seconds!';
      label1.Refresh;
      Sleep(2000);
      label1.Caption := 'step 3, please wait 3 seconds!';
      label1.Refresh;
      Sleep(3000);
      label1.Caption := 'over';
      label1.Refresh;
    end;用你花时间的代码替换sleep(*000)
      

  6.   

    使用定时器:
    procedure TForm1.Timer1Timer(Sender: TObject);
    begin
      Label1.Left := label1.Left + 5;
    end;
      

  7.   

    procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;Shift: TShiftState);
    const
      PageDelta = 10;
    begin
      With VertScrollbar do
      if Key = VK_NEXT then
      Position := Position + PageDelta
      else if Key = VK_PRIOR then
      Position := Position - PageDelta;
    end;