unit uROPleaseWaitForm_Kylix; {----------------------------------------------------------------------------} { RemObjects SDK Library - Delphi IDE Integration } { } { compiler: Delphi 5 and up, Kylix 2 and up } { platform: Win32, Linux } { } { (c)opyright RemObjects Software. all rights reserved. } { } { Using this code requires a valid license of the RemObjects SDK } { which can be obtained at http://www.remobjects.com. } {----------------------------------------------------------------------------} {$I RemObjects.inc} interface uses Libc, SysUtils, Classes, QForms, QGraphics, QControls, QExtCtrls, QStdCtrls; type TPleaseWaitForm = class(TForm) lbl_Caption: TLabel; img_Logo: TImage; procedure FormShow(Sender: TObject); procedure FormHide(Sender: TObject); private fWindowList:pointer; public constructor Create(iOwner: TComponent; const iCaption:string=''; const iHeader:string=''; iBitmap:TBitmap=nil; iFreeBitmap:boolean=false); reintroduce; procedure Show(const iCaption:string=''); reintroduce; procedure Hide; reintroduce; end; var PleaseWaitForm: TPleaseWaitForm; implementation {$R *.xfm} { TPleaseWaitForm } constructor TPleaseWaitForm.Create(iOwner: TComponent; const iCaption:string=''; const iHeader:string=''; iBitmap:TBitmap=nil; iFreeBitmap:boolean=false); begin inherited Create(iOwner); if iHeader <> '' then Caption := iHeader; lbl_Caption.Caption := iCaption; if Assigned(iBitmap) then begin img_Logo.Picture.Assign(iBitmap); if iFreeBitmap then iBitmap.Free(); end; img_Logo.Top := (ClientHeight-img_Logo.Height) div 2; img_Logo.Left := img_Logo.Top; lbl_Caption.Left := img_Logo.Width+ (img_Logo.Left*2); ClientWidth := lbl_Caption.Left+lbl_Caption.Width+img_Logo.Left; end; procedure TPleaseWaitForm.Show(const iCaption:string=''); begin if iCaption <> '' then begin lbl_Caption.Caption := iCaption; ClientWidth := lbl_Caption.Left+lbl_Caption.Width+8; end; inherited Show(); Application.ProcessMessages(); end; procedure TPleaseWaitForm.Hide; begin inherited Hide(); Application.ProcessMessages(); end; procedure TPleaseWaitForm.FormShow(Sender: TObject); begin end; procedure TPleaseWaitForm.FormHide(Sender: TObject); begin end; end.