I created two forms. I click in form1 to get two numbers from form2.
I start with this:
procedure TForm1.FormActivate(Sender: TObject);
begin
Form2.Enabled:=FALSE;
Form2.Visible:=FALSE;
end; // End TForm1.FormActivate(Sender: TObject)
So, just to make sure, In form1 I hide and disable form2 during form1 activation.
In form1 I have a TListBox with the following:
procedure TForm1.ListBox1Click(Sender: TObject);
Form2.Enabled:=TRUE;
Form2.Visible:=TRUE;
I enable and make visible form2 which has a TSpinEdit.
The very next line is:
My intent is for form 1 to stop and wait (by looping around) for me to spin to the correct number in form2 and then in form2 I have a procedure:
procedure TForm2.Button1Click(Sender: TObject);
begin
Number := SpinList1.Value+2;
Form2.Visible:=FALSE;
end;
Now it isn't visible so it's false and the procedure in form1 should continue. But not before I click the button in form2.
Now, the problem is that I think the While loop is running, but the procedure continues with the code AFTER the While loop even though form2 is still visible. As long as Form2 is visible, the While loop should be...
...
Looping! And not continuing past the While loop.
Shouldn't it?
Or is there something that makes
false even though during runtime, I can see it!