if dbIM.DataSource.State <> dsEdit then dbIM.DataSource.Edit;
dbIM.DataSource.DataSet.FieldByName(nmField).Clear;
dbIM.DataSource.DataSet.Post;
end;
end;
procedure TfmMain.mcSaveClick(Sender: TObject);
var dbIM:TDBImage;
begin
if Not(dlgSaveImage.Execute) then Exit;
dbIm:=nil;
With MenuClip do
if PopupComponent is TDBImage then dbIM:=(PopupComponent as TDBImage);
try
if dbIm<>nil then dbIM.Picture.SaveToFile(dlgSaveImage.FileName);
except
ShowMessage('Ошибка записи в файл:'+#13#10+dlgSaveImage.FileName);
end;
end;
procedure TfmMain.mcClearClick(Sender: TObject);
var dbIM:TDBImage;nmField:string;
begin
dbIm:=nil;
With MenuClip do
if PopupComponent is TDBImage then dbIM:=(PopupComponent as TDBImage);
Достарыңызбен бөлісу: |