Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Incident Reports » Incident Reports Reported for Version 1.13 » View Incident Report |
Serious |
Reported By: Graham Wood Reported On: 3/12/1999 For: Version 1.13 Build 1 |
procedure TFormMain.ButtonLoadPictureClick(Sender: TObject); begin with OpenPictureDialog do begin DefaultExt := 'BMP'; Filter := GraphicFilter(TGraphic); if Execute then begin if DataModuleMain.DataSourcePlant.AutoEdit then DataModuleMain.DataSourcePlant.Edit; DBImage.Picture.LoadFromFile(FileName); UpdatePictureField; end; end; end; procedure TFormMain.UpdatePictureField; var Tmp: TBitmap; begin if (DBImage.Picture.Graphic <> nil) and not (DBImage.Picture.Graphic.Empty) then begin if not (DBImage.Picture.Graphic is TBitmap) then begin Tmp := TBitmap.Create; try Tmp.Assign(DBImage.Picture.Graphic); DBImage.Picture.Assign(Tmp); finally Tmp.Free; end; end; end; end; procedure TFormMain.PictureMenuClick(Sender: TObject); begin case Integer(TMenuItem(Sender).Tag) of 1: DBImage.Perform(WM_CUT, 0, 0); 2: DBImage.Perform(WM_COPY, 0, 0); 3: DBImage.Perform(WM_PASTE, 0, 0); 4: begin if DataModuleMain.DataSourcePlant.AutoEdit then DataModuleMain.DataSourcePlant.Edit; DBImage.Picture.Graphic := nil; UpdatePictureField; end; end; end; procedure TFormMain.ButtonSaveAsClick(Sender: TObject); begin with SavePictureDialog do begin if (DBImage.Picture.Graphic <> nil) and not (DBImage.Picture.Graphic.Empty) then begin DefaultExt := GraphicExtension(TGraphicClass(DBImage.Picture.Graphic.ClassType)); Filter := GraphicFilter(TGraphicClass(DBImage.Picture.Graphic.ClassType)); end else begin DefaultExt := 'BMP'; Filter := GraphicFilter(TGraphic); end; if Execute then DBImage.Picture.SaveToFile(FileName); end; end;
This web page was last updated on Wednesday, March 20, 2024 at 07:22 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |