Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Taskbar icon

edited May 2004 in General
Hi,

how to make report preview window icon appear on the taskbar when it is
minimized?

Comments

  • edited May 2004
    Hi Pavel,

    By default Delphi applications only have one Taskbar icon. The in a
    multiple form application, the main application window is the only one that
    has the WS_EX_APPWINDOW extended window style. Secondary windows then
    minimize to the bottom of the screen similar to a MDI child.

    To allow the preview window to show up in the Windows taskbar, you will need
    to change the ReportBuilder source (in one case the Interface section so RAP
    will become useless). Below are the steps to take if you are interested in
    makeing changes to the RB source. We will possibly add this as an option
    for a later release of ReportBuilder.

    1. Override the CreateParams procedure inside the TppCustomPreviewer class
    in the ppForms.pas file. Place the procedure in the public section.

    procedure CreateParams(var params: TCreateParams);

    2. Implement the CreateParams procedure as follows...

    procedure TppCustomPreviewer.CreateParams(var Params: TCreateParams);
    begin
    inherited CreateParams(Params);
    Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
    end;

    3. Add the "Windows" unit to your uses clause at the top of the ppForms.pas
    file.

    4. If you compile now, you will receive an error on the RegisterClass and
    UnRegisterClass calls at the bottom of the file. You will need to define
    the Classes unit as their source destination.

    Classes.RegisterClass(...);
    Classes.UnRegisterClass(...);

    Save and rebuild. Now the Preview window will show up in the task bar.
    Remember that once you make these changes, RAP will no longer work.


    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.