Recent

Author Topic: Code snippet: flashing modal form  (Read 4862 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Code snippet: flashing modal form
« on: April 06, 2010, 04:28:22 am »
Create a form and add the following code:
Code: [Select]
type
  TFrmBase = class(TForm)
  protected
    procedure CreateParams(var Para: TCreateParams); override;
    {....}
  end;

  {.....}

implementation

procedure TFrmBase.CreateParams(var Para: TCreateParams);
begin
  inherited;
  Para.WndParent := GetActiveWindow;
end;
Now create your modal form inheriting this form. Create it somewhere and call its ShowModal method. Now it will flash if you clicks in the parent form.

Taken from Torry's Delphi Pages

 

TinyPortal © 2005-2018