unit Unit1;
interface
uses
Jpeg, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,
DB, DBTables, StdCtrls, Mask, DBCtrls, ExtCtrls, ExtDlgs;
type
TForm1 =
class(TForm)
DataSource1: TDataSource;
Table1: TTable;
DBNavigator1: TDBNavigator;
DBEdit1: TDBEdit;
OpenPictureDialog1: TOpenPictureDialog;
Button1: TButton;
Image1: TImage;
Label1: TLabel;
Bevel1: TBevel;
procedure Button1Click(Sender: TObject);
procedure Image1Click(Sender: TObject);
procedure DataSource1DataChange(Sender: TObject; Field: TField);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
If OpenPictureDialog1.Execute
then Begin
Table1.Edit;
Table1.FieldbyName('
Bild').AsString:=OpenPictureDialog1.Filename;
Table1.Post;
End;
end;
procedure TForm1.Image1Click(Sender: TObject);
begin
Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName );
end;
procedure TForm1.DataSource1DataChange(Sender: TObject; Field: TField);
begin
Image1.Picture.Filename:='
'xyz.jpg'
;
end;
end.