home *** CD-ROM | disk | FTP | other *** search
-
- {*****************************************************************************}
- { }
- { Animals Demo }
- { }
- { illustrating the use of the }
- { }
- { QDB v2.10 Visual Components for Delphi 1, 2, & 3 }
- { }
- { Copyright (c) 1995, 1996, 1997, 1998, Robert R. Marsh, S.J. }
- { & the British Province of the Society of Jesus }
- { }
- { }
- { You may use this demonstration application and modify it in }
- { whatever way you choose. You may not, however, sell it for }
- { profit unless the changes you have made are substantial (i.e., }
- { more than 50% new code), in which case I'd appreciate }
- { receiving a copy of your new work. }
- { }
- { If you like Animals and find yourself using it please }
- { consider making a donation to your favorite charity. }
- { }
- { Users of Animals must accept the following disclaimer of warranty: }
- { }
- { Animals is supplied as is. The author disclaims all warranties, }
- { expressed or implied, including, without limitation, the }
- { warranties of merchantability and of fitness for any purpose. }
- { The author assumes no liability for damages, direct or }
- { consequential, which may result from the use of Animals. }
- { }
- {*****************************************************************************}
-
- unit ani_main;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Graphics, Forms, Classes, StdCtrls, Buttons,
- ExtCtrls, Controls, QDB, QDBView;
-
- type
- Tani_form = class(TForm)
- Panel1: TPanel;
- BitBtn1: TBitBtn;
- Q: TQDBView;
- QP: TPanel;
- Label1: TLabel;
- Name: TEdit;
- Label2: TLabel;
- Size: TEdit;
- Label3: TLabel;
- Weight: TEdit;
- Label4: TLabel;
- Image: TImage;
- Panel3: TPanel;
- QN: TQDBNavigator;
- Found: TEdit;
- procedure FormCreate(Sender: TObject);
- procedure QNavigate(Sender: TObject);
- procedure FormDestroy(Sender: TObject);
- private
- end;
-
- var
- ani_form: Tani_form;
-
- implementation
-
- {$R *.DFM}
-
- procedure Tani_form.FormCreate(Sender: TObject);
- begin
- {locate and set the QDB file}
- Q.FileName:=ChangeFileExt(Application.ExeName,'.qdb');
- {we use a cache size that will hold all the items}
- Q.CacheSize:=128*1024;
- {we want to start at the beginning}
- Q.FirstItem;
- end;
-
- {every time we move through the database we do this ...}
- procedure Tani_form.QNavigate(Sender: TObject);
- begin
- QP.Refresh;
- end;
-
- procedure Tani_form.FormDestroy(Sender: TObject);
- begin
- Q.FileName:='';
- end;
-
- end.
-