Hello,
I have a question (might be pretty easy, but please help!!): on my application's main form I have two buttons: open that opens Form1 and another one that opens Form2. Now, from Form1 I need to open Form2, and from Form2 I need to open back Form1, and go back and forth. The forms have to be modal and open one from the other. The Form2 button opens Form1, that has a button that opens Form2 back.
I am having some trouble with opening and closing the windows.
Doing this seems bad:
//on Form1:
procedure TForm1.Button1Clck(Sender : TObject);
begin
Close;
Form2.ShowModal;
end;
//on Form2:
procedure TForm2.Button1Clck(Sender : TObject);
begin
Close;
Form1.ShowModal;
end;
Please help me, any advice is highly appreciated!
Pici