M moutocean Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-12 #1 现在有一个数据库为Paradox,其中有一个字段Map用来存储图片,如何将 该字段的值取出,并赋给一个变量Pict,Pict这个变量该如何定义?
D delphi-abc Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-12 #2 可用以下代码: procedure TForm1.button1click(sender:Tobject); begin image1.picture.bitmap.assign(TBLOBFIELD(table1.fields[1])); end;
可用以下代码: procedure TForm1.button1click(sender:Tobject); begin image1.picture.bitmap.assign(TBLOBFIELD(table1.fields[1])); end;
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-12 #3 保存到文件: TBLOBFIELD(table1.FieldByName('fieldname')).SaveToFile 显示: var str:TBlobStream str:=TBlobStream.Create(TBLOBFIELD(table1.FieldByName('fieldname')),bmRead); image1.picture.bitmap.LoadFromStream(str); str.Free;
保存到文件: TBLOBFIELD(table1.FieldByName('fieldname')).SaveToFile 显示: var str:TBlobStream str:=TBlobStream.Create(TBLOBFIELD(table1.FieldByName('fieldname')),bmRead); image1.picture.bitmap.LoadFromStream(str); str.Free;
D delphi-abc Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-13 #5 对于千中元,太简单了,仅需 TBLOBFIELD(table1.fields[1]).assign(image1.picture.bitmap)
L LeeChange Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-13 #6 TBlobField有以下属性; SaveToFile LoadFromFile SaveToClipboard LoadFromClipboard Assign
V Victortim Unregistered / Unconfirmed GUEST, unregistred user! 2000-05-23 #8 MStream:=TStream.Create; table1.FieldByName('fieldname').SavetoStream(MStream); image.picture.graphic.LoadFromStream(MStream);
MStream:=TStream.Create; table1.FieldByName('fieldname').SavetoStream(MStream); image.picture.graphic.LoadFromStream(MStream);