Doubt about modal form in MDI application

Asked

Viewed 463 times

0

Well, I’ll try to summarize. I have an MDI application which I would like the "MODAL" forms to be superimposed only on the "fsMDIChild" forms and not on the entire application. I conducted a survey and did not get a solution through showmodal, it seems that there is no way to do. My question: is there any way to create a form "type" that is ahead of the forms within the MDI application and at the same time allows me to minimize the application?

Grotesque example: Several open sign-up screens and by clicking the delete button of one of them appears the message "Do you really want to delete?". This confirmation message I would like to be in front of the registration screens, within the application area, as are the "fsMDIChild" and at the same time allow me to minimize the main form.

1 answer

1

Have you tried using the BringToFront?

With the code snippet below removed from the help Delphi you can adapt to use reality, try to use the BringToFront to keep your question screen above the other daughters screens.

procedure TForm1.ShowPaletteButtonClick(Sender: TObject);
begin
  if Form2.Visible = False then Form2.Visible := True;
  Form2.BringToFront;
end;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.