I have a program in which I'm using inputboxes. When the inputbox opens, I'm able to key in a value, but after clicking Ok or Cancel the inputbox doesn't close and the program doesn't react to anything anymore: it has to be killed from the task list. Part of the code is:
var rstr: String;
begin
rstr:= InputBox('Simulation', 'Reference-car', IntToStr(ReferenceCar));
try
ReferenceCar := StrToInt(rstr);
if (ReferenceCar < 1) or (ReferenceCar > nVehicles) then
ReferenceCar := 1;
MyIniFile.WriteInteger('Settings', 'ReferenceCar', ReferenceCar)
except
on E: EConvertError do
ShowMessage(E.ClassName + CRLF + E.Message)
end
end;
The same happens also for other forms which are opened inside the main form.
Any idea what's wrong?