1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33:
| procedure tform1.t4click(sender:tobject); var dname : string; begin edit8.text := QBuchstamm.fieldbyname('TITEL').asstring; dname := concat(home, '\', 'Bildb\',QBuchstamm.fieldbyname('TITEL').asstring,'.jpg'); if fileExists(dname) then begin TBuchBild := TForm.Create(Self); TBuchBild.setbounds(10,325,290,400); TBuchBild.BorderIcons := bordericons -[biminimize, bimaximize]; TBuchBild.Show; image2.Parent := TBuchBild; image2.picture.loadfromfile(dname); TBuchBild.Caption := extractfilename(dname); image2.setbounds(10,10,260,350); image2.Visible := true; image2.Hint := 'Vergr÷¯ern mit <Klick>'; end else showmessage(QBuchstamm.fieldbyname('TITEL').asstring+' ist noch nicht digitalisiert ..'); end;
procedure TForm1.img2_onclick(sender:tobject); begin if image2.Width = 520 then begin TBuchBild.setbounds(10,325,290,400); image2.setbounds(10,10,260,350); image2.Hint := 'Vergr÷¯ern mit <Klick>'; end else if image2.Width = 260 then begin TBuchBild.setbounds(5,5,560,730); image2.setbounds(10,10,520,680); image2.Hint := 'Verkleinern mit <Klick>'; end; end; |