john230873
Programmer
I have 2 forms (one main, one second). I what to have multiple second forms.
When the accept button is press on the second form then I want the second form to close and trigger a procedure in the first form.
Here is the code to create the form (note I have rerouted the
button's click procedure to the main form. The problem is a can't get the scond form to close
procedure TForm1.Button1Click(Sender: TObject);
begin
With TForm2.create(self) do
begin
Button1.OnClick := Showthemessage;
Show;
end;
end;
procedure TForm1.Showthemessage(Sender: TObject);
begin
showmessage('triggered');
end;
When the accept button is press on the second form then I want the second form to close and trigger a procedure in the first form.
Here is the code to create the form (note I have rerouted the
button's click procedure to the main form. The problem is a can't get the scond form to close
procedure TForm1.Button1Click(Sender: TObject);
begin
With TForm2.create(self) do
begin
Button1.OnClick := Showthemessage;
Show;
end;
end;
procedure TForm1.Showthemessage(Sender: TObject);
begin
showmessage('triggered');
end;