unit Unit1; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, Unit2; type { TForm1 } TForm1 = class(TForm) Button1: TButton; Label1: TLabel; Label2: TLabel; Label3: TLabel; ListBox1: TListBox; ListBox2: TListBox; Memo1: TMemo; Memo2: TMemo; Memo3: TMemo; procedure Button1Click(Sender: TObject); procedure FormClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure FormResize(Sender: TObject); procedure ListBox1Click(Sender: TObject); private { private declarations } public { public declarations } loesungen: tLoesungArray; Rs,Cs: tMyExtendedArray; end; var Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.FormResize(Sender: TObject); begin Memo1.Height:=Form1.ClientHeight-Memo1.Top; Memo2.Height:=Form1.ClientHeight-Memo2.Top; Memo3.Height:=Form1.ClientHeight-Memo3.Top; ListBox1.Height:=Form1.ClientHeight-ListBox1.Top; ListBox2.Height:=Form1.ClientHeight-ListBox2.Top; end; procedure TForm1.ListBox1Click(Sender: TObject); begin if (Listbox1.Itemindex>=0) and (Listbox1.Itemindex=1000000 then begin c1:=0; Form1.Caption:=inttostr(c2)+' '+(sender as tLoesung).dumpWeite; Application.ProcessMessages; end; end else begin inc(c2); if c2 mod 100 = 0 then begin Form1.Color:=random($1000000); Form1.Caption:=inttostr(c2)+' '+rightstr(Form1.Caption,length(Form1.Caption)-pos(' ',Form1.Caption)); Application.ProcessMessages; end; end; end; procedure TForm1.FormCreate(Sender: TObject); begin Rs:=nil; Cs:=nil; end; procedure TForm1.FormDestroy(Sender: TObject); begin Rs.free; Cs.free; end; end.