Skip to main content
All docs
V26.1
  • TdxSplashFormBase.Hide Method

    Hides the Splash/Wait form.

    Declaration

    procedure Hide;

    Remarks

    Call Show[1] and Hide procedures to manually display/hide the current Splash/Wait form.

    Code Example: Display a Wait Form During Report Export

    The following code example exports content of a configured TdxReportControl component to a file in the Portable Document (PDF) format using an intermediary TMemoryStream object:

    uses
      dxReport.Control,  // Declares the TdxReportControl component
      dxSplashForms,     // Declares the TdxSplashFormManager class and related types
      dxShellDialogs;    // Declares the TdxSaveFileDialog component
    // ...
    
    procedure TMyForm.cxButtonExportToPDFClick(Sender: TObject);
    var
      AStream: TMemoryStream;
    begin
      if not dxSaveFileDialog1.Execute(Handle) then Exit;  // Displays the "Save File" dialog
      AStream := TMemoryStream.Create;       // Creates a stream as an intermediary container
      // Displays a Wait Form before the export operation
      TdxSplashFormManager.WaitForm.Show(dxReportControl1.Parent);
      try
        dxReportControl1.ExportToPDF(AStream);   // Exports content to a stream in the PDF format
        AStream.SaveToFile(dxSaveFileDialog1.FileName);    // Saves PDF stream content to a file
      finally
        AStream.Free;                        // Releases the intermediary memory stream
        TdxSplashFormManager.WaitForm.Hide;  // Hides the Wait Form once the operation is complete
      end;
    end;
    
    Footnotes
    1. TdxSplashFormBase class descendants implement different Show methods:

    See Also