Thank you for your feedback, I try to be more precise.
I work with windows 10.
I try to modify an old simulation programm which is an console application. It roughly looks like this.
Program SimForce;
{$APPTYPE CONSOLE}
uses
...
const
...
var
...
begin // SimForce main
Initalize;
repeat
Calculation;
until T >= TMAX;
end.
To use TMemo I changed it to have a very simple GUI
unit SimForce;
{$mode objfpc}{$H+}
interface
uses
...
const
...
type
{ SimForce_GUI }
SimForce_GUI = class(TForm)
Button1: TButton;
Button2: TButton;
InUpMemo: TMemo;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
...
implementation
{$R *.lfm}
// SimForce main
procedure SimForceMain;
begin
//To use console
AllocConsole;
IsConsole := True;
SysInitStdIO;
Initalize;
repeat
Calculation;
until T >= TMAX;
end;
{ SimForce_GUI }
procedure SimForce_GUI_GUI.Button1Click(Sender: TObject);
begin
SimForce_GUI.InUpMemo.Lines.LoadFromFile('InputUpdate.txt');
SimForceMain;
end;
procedure TInUp_GUI.Button2Click(Sender: TObject);
begin
submit := true;
end
end.
My problem is when i press Button1 the simulation starts but the GUI is not responding anymore until the simulation is finished.
I don't know where the problem is. Thank you in advance for your help!
I attached a picture of the GUI as it is not responding.