eDBImage for Delphi XE8 Full Source
EDBImage for Delphi XE8 Full Source | 27 kB
Transparent DBImage control. Paints the bitmap transparently onto its background. Note that its background is not itself see through, but has the color specified in its Color property.
You can store .wmf, .emf, .jpg, .ico, .bmp images in your database WITHOUT a line of code !!
If you need other image type then you can use an event to load the apropiete image type.
TQREDBImage is for printing .wmg .jpg, etc. with QuickReport
The only condition is : the field in your database must be a blob field.
This example requires a TDBImage, a TClientDataSet and a TDataSource already on the form. A custom data set is created and a record is added to it, containing a sample image. The TDBImage control then displays the 'Image' field in the data source. The Proportional flag of the TDBImage control is set to True in order to make the sample image fit the bounds of the TDBImage.
procedure TForm1.FormCreate(Sender: TObject);
begin
ClientDataSet1.Active := False;
with ClientDataSet1.FieldDefs do
begin
with AddFieldDef do
begin
DataType := ftString;
Size := 20;
Name := 'Name';
end;
with AddFieldDef do
begin
DataType := ftGraphic;
Name := 'Image';
end;
end;
DataSource1 := TDataSource.Create(Form1);
DataSource1.DataSet := ClientDataSet1;
ClientDataSet1.CreateDataSet;
ClientDataSet1.Insert;
ClientDataSet1.FieldByName('Name').Value := 'test';
(ClientDataSet1.FieldByName('Image') as TGraphicField).LoadFromFile('flower.bmp');
ClientDataSet1.Post;
DBImage1.DataSource := DataSource1;
DBImage1.Proportional := True;
DBImage1.DataField := 'Image';
end;
Restriction: If you have 6 month or more than six month VIP membership please mail us for password.
Only for V.I.P
Warning! You are not allowed to view this text.