// this is the default behavior procedure TForm1.OnPreviewFile(Sender: TObject; Viewer: TObject; Filename: String; ParamsOnly: Boolean; begin if ParamsOnly then (Viewer as TImageEnView).IO.ParamsFromFile(Filename) else if Viewer is TImageEnView then (Viewer as TImageEnView).IO.LoadFromFileAuto(Filename) else if Viewer is TImageEnMView then (Viewer as TImageEnMView).LoadFromFileOnDemand(Filename); end;