The image data in the database is displayed in Image

zhaozj2021-02-16  100

How the picture data in the database appear in the Image of the procedure TSpczhForm.SpeedButton1Click (Sender: TObject); beginOpenPictureDialog1.Execute; Image1.Picture.LoadFromFile (OpenPictureDialog1.FileName); end; procedure TSpczhForm.SaveSBClick (Sender: TObject); varGraphic1: TImage ; beginGraphic1:. = TImage.Create (self); Graphic1.Picture.LoadFromFile (OpenPictureDialog1.FileName); FieldByName ( 'sptp') Assign (Graphic1.Picture); Graphic1.Free; end; these are my pictures to add to the database The code, I don't know if there is a better way. Now I want to turn it over, when you click on a record in DBGrid, display the image data in the database in the Image control so that you can make a modification, I am now chaotic, I hope that all my dear will give a two! The younger brother is grateful! ! !

转载请注明原文地址:https://www.9cbs.com/read-14598.html

New Post(0)