//murat turan
{ *** ÖRNEK 1 *** }
var
MyDLL: THandle;
RS: TResourceStream;
begin
MyDLL := LoadLibrary('MyDll.Dll');
if MyDLL = 0 then Exit;
try
RS := TResourceStream.Create(MyDLL, 'LOGO', RT_RCDATA);
try
Image1.Picture.LoadFromStream(RS);
finaly
RS.Free;
end;
finally
FreeLibrary(MyDLL);
end;
end;
{ *** ÖRNEK 2 *** }
Stream := TMemoryStream.Create;
Stream.LoadFromFile('c:\test.bmp');
//_picture.SaveToStream(Stream);
Stream.Position := 0;
SQLQuery1.SQL.Add('INSERT INTO controlproperties (picture) VALUES (:picture) ');
SQLQuery1.ParamByName('picture').LoadFromStream(Stream, ftblob);
SQLQuery1.ExecSQL();
Stream.free;
{ *** ÖRNEK 3 *** }
var
BlobField: TField;
BS : TStream;
begin
try
BlobField := Table2.FieldByName('FOTO');
BS := Table2.CreateBlobStream(BlobField,bmRead);
PersonImage.Picture.Bitmap.LoadFromStream(BS);
except
ShowMessage('işlem gerçeklştirilemedi.');
end;
end;