Keep a form in front of his owning form in showmodal lazarus / 10-Designer ---------------------------------------------------------------------- torbente · 2014-09-08 20:44 I create a new form MiForm := TForm3.Create(self); MiForm popupparent := self; MiForm.PopupMode:= pmExplicit; MiBuyInForm.ShowModal; But it keeps all the forms of my app locked. If i just call MiBuyInForm.ShowModal , the new form remains in top of the calling one, but do not blocks it from new click. Any help ? ---------------------------------------------------------------------- taazz · 2014-09-08 22:47 show modal is suppose to lock all the other forms while the modal form is visible. If for any reason it does not lock everything then it is a bug a small sample replicating the bug so we can check it would be nice and of course a bug report on mantis is mandatory, attach the sample in mantis and post here a link to the report instead of uploading it here directly. ---------------------------------------------------------------------- torbente · 2014-09-09 01:09 Sorry, i miss typed this... Quote from: torbente on September 08, 2014, 10:44:05 pmI create a new form MiForm := TForm3.Create(self); MiForm popupparent := self; MiForm.PopupMode:= pmExplicit; MiBuyInForm.ShowModal; But it keeps all the forms of my app locked. If i just call MiForm.Show , the new form remains in top of the calling one, but do not blocks it from new click. Any help ? Using showmodal lock all forms as it is suppossed, but i want just lock the owner form (DialogDirectory do that, for example) ---------------------------------------------------------------------- torbente · 2014-09-13 01:50 I give a try to this for 2 days and im not able to find the way. Maybe it is not possible? ---------------------------------------------------------------------- bylaardt · 2014-09-13 03:32 On the OnCreate event of MiForm: Code: [Select]Tform(parent)enabled:=false; On the OnClose event: Code: [Select]TForm(parent).enabled:=true; And use Show as ShowModal. If you need ShowModal Results, you mus set manually on the buttons clicks if you need wait the window close, do this after the show: Code: [Select]while miform.visible do application.processmessages; ---------------------------------------------------------------------- cpalx · 2014-09-14 01:17 Use stayontop property and use show function  not showmodal ---------------------------------------------------------------------- Awesome Programmer · 2015-12-10 19:51 Quote from: cpalx on September 14, 2014, 03:17:37 amUse stayontop property and use show function  not showmodal What if you have to use ShowModal in your code? ---------------------------------------------------------------------- Awesome Programmer · 2015-12-23 17:06 Quote from: bylaardt on September 13, 2014, 05:32:34 amOn the OnCreate event of MiForm: Code: [Select]Tform(parent)enabled:=false; On the OnClose event: Code: [Select]TForm(parent).enabled:=true; And use Show as ShowModal. If you need ShowModal Results, you mus set manually on the buttons clicks if you need wait the window close, do this after the show: Code: [Select]while miform.visible do application.processmessages; I know this thread or topic is old, but I've been looking for solution for the showmodal problem. I tried yours suggestion which I thought was very promising but it didn't work. Actually it raised Segmentation Fault and the whole program crashed or terminates itself....