Hi Juan.
Here is what I do for a shareware nag. Your mainform needs to be opened, but
you can have it hidden until the window of interest is, as would be in your
case, timed out.
Dont worry about complete blocks, I have cut out some registration code, so
there might be an incorrect balance of begin/end.
In case your interested, there is an example of this in Formclose of my soft
camsnap which is here:
http://members.xoom.com/A_George/CamSnap
procedure TPRForm.FormCreate(Sender: TObject);
var
bitmap: Tbitmap;
MyJPEG: TJPEGImage;
form: TForm;
begin
MyJPEG := TJPEGImage.Create;
bitmap := Tbitmap.Create;
try
with MyJPEG do begin
LoadFromFile('al.jpg');
{make up your image to suit - you could do without a JPEG, but the filesize
for internet use would be suspect - remember to put JPEG in the uses clause,
you could also embed the jpeg file
in your EXE, but I have this covered in my software in case of deletion, the
nag still remains}
with bitmap do begin
Width := MyJPEG.Width;
Height := MyJPEG.Height;
Canvas.Draw(0, 0, MyJPEG);
end;
end;
form := tform.Create(self);
form.Position := poScreenCenter;
form.Width := bitmap.Width; form.Height := bitmap.Height;
form.Visible := true;
form.canvas.Draw(0, 0, bitmap);
bitmap.free; MyJPEG.Free;
except begin bitmap.free; MyJPEG.Free; end
end;
try form.Free; except ; end;
end;
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz