Question about modal form in MDI application

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 did a search and did not get a solution through showmodal, it seems like there is no way to do it. My question: is there any way to create a form "type" that stays in front of the forms within the MDI application and at the same time allows me to minimize the application?

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

    
asked by anonymous 20.04.2015 / 14:27

1 answer

1

Have you tried using BringToFront ?

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

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