{Bilder mit "OpenDialog" und "Image" einlesen sowie
DB_Bilder mit "OpenPictureDialog" und "DBImage" einlesen
**************************************************************}
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, ExtCtrls, JPEG, ExtDlgs, DBCtrls;
type
TForm1 =
class(TForm)
Image1: TImage;
//normale Bilder
BitBtn1: TBitBtn;
OpenDialog1: TOpenDialog;
DBImage1: TDBImage;
//Datenbank_Bilder
OpenPictureDialog1: TOpenPictureDialog;
Button1: TButton;
procedure BitBtn1Click(Sender: TObject);
//beide Button_Arten gehen
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
//Images einlesen
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
if OpenDialog1.Execute
then
Image1.picture.LoadfromFile(OpenDialog1.Filename);
end;
//DBImages einlesen
procedure TForm1.Button1Click(Sender: TObject);
begin
If OpenPictureDialog1.Execute
then
DBImage1.Picture.LoadfromFile(OpenPictureDialog1.FileName);
end;
end.