象photoshop启动时那样,可以实时显示?

解决方案 »

  1.   

    自己顶哦
    ------------------------------------
    hoho
      

  2.   

    实时显示组件加载进度的代码放在 快闪窗口 的FormShow里
      

  3.   

    实时显示组件加载进度(举例)的代码放在 快闪窗口 的OnFormShow里
      

  4.   

    是哪个组件呢?application.ProcessMessages;这句可以吗?
      

  5.   

    转载
    Unit Name: AppLdr
     Author:    tony
     Purpose:   Application Loader
     History:   2004.07.08 create
    -----------------------------------------------------------------------------}unit AppLdr;interfaceuses
      Windows, Messages, SysUtils, Classes, Controls, Forms, SplashForm,
      TLMIniFilter, ActiveX, Common;type
      TAppLoader = class (TObject)
      private
        FSplashForm: TfrmSplash;
        FtlmIniFilter:TtlmIniFilter;
        procedure OnAppLoading(ASender:TObject;AEvent:String;ADelay:Integer=50);
      public
        constructor Create();
        destructor Destroy();override;
        function DoLoad: Boolean;
      end;var
      GAppLoader:TAppLoader;implementationuses
      SkinMdl, ConfigMgr, CommMgr, ICDeviceMgr, HdgClient, C1;{
    ********************************** TAppLoader **********************************
    }
    constructor TAppLoader.Create();
    begin
      inherited Create();
      FtlmIniFilter:=TtlmIniFilter.Create(Application);
      FtlmIniFilter.LanguageFiles.Add('HDG2.chs');
      FtlmIniFilter.LanguageExt:='.chs';
      FtlmIniFilter.Active:=true;
    end;destructor TAppLoader.Destroy();
    begin
      if Assigned(frmC1) then begin
        GCommManager.EndListen();
        FreeAndNil(frmC1);
      end;
      if Assigned(GHdgClient) then begin
        FreeAndNil(GHdgClient);
      end;
      if Assigned(GCommManager) then begin
        FreeAndNil(GCommManager);
      end;
      if Assigned(GICDevice) then begin
        FreeAndNil(GICDevice);
      end;
      if Assigned(GSkinModule) then begin
        FreeAndNil(GSkinModule);
      end;
      if Assigned(GConfigManager) then begin
        FreeAndNil(GConfigManager);
      end;
      if Assigned(FtlmIniFilter) then begin
        FreeAndNil(FtlmIniFilter);
      end;
      inherited Destroy();
    end;function TAppLoader.DoLoad: Boolean;
    begin
      Result:=false;
      Application.Title:='HDG2';
      FSplashForm:=TfrmSplash.Create(nil);
      try
        try
          FSplashForm.Show;
          OnAppLoading(nil,'Starting...');
          Sleep(200);      GConfigManager:=TConfigManager.Create();
          GSkinModule:=TSkinModule.Create(nil);      GICDevice:=TICDeviceDecorator.Create();
          GICDevice.OnAppLoading:=OnAppLoading;
          GICDevice.Initialize();
          GICDevice.OnAppLoading:=nil;
          
          GCommManager:=TCommManagerDecorator.Create(nil);
          GCommManager.ConfigManager:=GConfigManager;
          GCommManager.ICDevice:=GICDevice;
          GCommManager.OnAppLoading:=OnAppLoading;
          GCommManager.Initialize(true,false,false);
          GCommManager.OnAppLoading:=nil;      GHdgClient:=THdgClient.Create();
          GHdgClient.OnAppLoading:=OnAppLoading;
          GHdgClient.Initialize();
          GHdgClient.OnAppLoading:=nil;
          
          OnAppLoading(nil,'Ending...');      Screen.Cursors[crNo]:=LoadCursor(hInstance,'None');
          Application.CreateForm(TfrmC1, frmC1);
          
          GCommManager.BeginListen(frmC1);
          frmC1.SysCaption:=GConfigManager.SysCaption;
    {$IFNDEF HDGCLIENT}
          frmC1.SysLedCaption:=GConfigManager.SysLedCaption;
    {$ENDIF}      Result:=true;
        except
          on E:Exception do begin
            MessageBox(Application.Handle,PChar(E.ClassName+':'+#13+#10+E.Message),
                PChar(Application.Title),MB_ICONERROR);
          end;
        end;
      finally
        FreeAndNil(FSplashForm);
      end;
    end;procedure TAppLoader.OnAppLoading(ASender:TObject;AEvent:String;
            ADelay:Integer);
    begin
      if Assigned(FSplashForm) then begin
        if Assigned(ASender) then begin
          FSplashForm.lbl1.Caption:=ASender.ClassName+': '+AEvent;
        end
        else begin
          FSplashForm.lbl1.Caption:=AEvent;
        end;
        FSplashForm.Update;
        if ADelay>0 then
          Sleep(ADelay);
      end;
    end;end.工程的dpr中这样用:
    begin
      Application.Initialize;
      GAppLoader:=TAppLoader.Create();
      try
        if GAppLoader.DoLoad() then begin
      Application.Run;
        end;
      finally
        GAppLoader.Free;
      end;
    end.
      

  6.   

    呵呵,楼上贴的是我的代码嘛这段程序的效果可以看这个程序:
    http://www.tonixsoft.com/ultraalbum
      

  7.   

    to tonylk(=www.tonixsoft.com=) :那连接是社那马啊!
      

  8.   

    同意 zdq801104(我很笨,但是我不傻!)。
      

  9.   

    TO tonylk(=www.tonixsoft.com=) ,我都说是转载了,当然是别人的了,不过没有想到是大哥你的
    ^_^