Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Can you make a modal form that just blocks the parent and not the whole app?

edited May 2021 in OpenInsight
I have a form that opens another form. I want this child form to block the parent but not the whole app. Is this possible? The create_dialog and dialog_box function block the whole app...

Comments

  • I don't believe you can achieve this automatically or through simple configuration options. The MSG function does support the ability to restrict modality to the parent window, but I believe this is done through additional programming similar to what you would have to do. I think you'll have to use Create_Dialog to launch your form as modeless and then disable the parent. Then you'll have to create your own wait loop while the modeless dialog is running.
  • Try starting the child window using Start_Window. During it's CREATE event, set the parent's ENABLED property to 0. During it's CLOSE event, set the parent's ENABLED property to 1. If ENABLED doesn't work, you can try calling the Win32 EnableWindow API.
  • You might also find the technique summarized in this OI 10 Blog article useful in crafting your own solution.
  • Thanks for the tips, I will have a go at what you suggested.
Sign In or Register to comment.