在主窗体显示以前先显示的窗体,显示几秒种后消失,然后显示主窗体.该如何做?

解决方案 »

  1.   

    放个timer 计算时间不就可以了
      

  2.   

    写在 主程序里面
        MoveForm:=TMoveForm.Create(Application);{Create创建闪现窗口对象}
        MoveForm.Show;
        MoveForm.Update;
        ...... 
      
        MoveForm.Hide;
        MoveForm.Free;{Free从内存中释放对象}
        Application.Run;
      

  3.   

    program FeeMan;uses
      ShareMem,
      Forms,
      Windows,
      classes,
      Main in '..\Lib\Main.pas' {MainForm},
      uDMBase in '..\Lib\uDMBase.pas' {dmBase: TDataModule},
      uLogin in '..\Lib\uLogin.pas' {fmPasswordDlg},
      ufmItFlash in 'Source\ufmItFlash.pas' {fmItFlash},
      uFeeMan in 'Source\uFeeMan.pas',
      RightDef in '..\Lib\RightDef.pas',
      uDataView in '..\Lib\uDataView.pas' {DataView},
      uDmUserConfig in 'Source\uDmUserConfig.pas' {dmUserConfig: TDataModule},
      ufmViewrecordBase in '..\Lib\ufmViewrecordBase.pas' {fmViewrecordBase},
      uMeterDataAndFeeStyleDataView in 'Source\uMeterDataAndFeeStyleDataView.pas',
      uDMFeeMan in 'Source\uDMFeeMan.pas' {dmFeeMan: TDataModule},
      ufrmFeeStyleData in 'Source\ufrmFeeStyleData.pas' {frmFeeStyle: TFrame},
      ufmQryFee in 'Source\ufmQryFee.pas' {fmQryFee},
      AC_ExportExcel in 'Source\AC_ExportExcel.pas' {DlgACExportExcel};{$R *.RES}var
      FOperatorID: Integer;
      hMutex: THandle;
    begin
      Application.Title := '¼ÆÁ¿ÊշѹÜÀíϵͳ';
      HMutex := CreateMutex(nil, False, '96777E99-3E05-44C1-8C47-666B93416889');
      if WaitForSingleObject (hMutex, 0) <> WAIT_TIMEOUT then begin
        FlashForm := TfmItFlash.Create(nil);
        FlashForm.Show;
        Application.ProcessMessages;
        Application.Initialize;
        //FOperatorID := 1;
        with TdmBase.Create(nil) do begin
          try
            FOperatorID := UserID;
          finally
            Free;
          end;
        end;
        if FOperatorID > 0 then begin
          FlashForm.SetFocus;
          Application.ProcessMessages;
          Application.Title := '';
          Application.CreateForm(TMainForm, MainForm);
      MainForm.OperatorID := FOperatorID;
          //Application.ProcessMessages;
          //if Assigned(FlashForm) then Sleep(618);
          FlashForm.Free;
          Application.Run;
        end;    if Assigned(FlashForm) then begin
          FlashForm.Free;
          FlashForm := nil;
        end;
      end
      else begin
        
      end;  
    end.