Make A Window That Disables It's Parent

I want to be able to make a window that goes over the top of another and unless you close that window, you cannot interact with the behind it. In Windows applications that use this, I have noticed a beep sound when you try to click on the parenting window while that window is open. I need to use this technique as an essential part of the design for my application. If this is possible, I will have to come up with a different technique.

Thanks in advance

What you are describing is a modal window. Use one of the modal window frames then do .showmodal to display it. Be advised that your code will cease execution until that window is dismissed by the user.

In Windows showmodal with a document type window still allows access to the calling windows. Changing the second window frame type to Modal Dialog or Movable Modal works as you’d expect.

I suspect this must be different on OSX or there’d be no point in having both show & showmodal.

.showmodal stops code execution until the window is dismissed. .show allows code to continue. That’s the diff.

Well that’s not what I’m seeing on Windows. If I have two windows window1 has a button to showmodal window2 and a text field. Pushing the button shows window2, but I can move it aside and still enter text into the textfield on window1. However if I set window2 to be a modal type I can’t.

I remember with VB.NET, a ShowModal function which did not seem to make any difference from just a normal Show.

I believe the difference comes into play when the window is a modal frame type. Then .Show and .ShowModal behave differently. If the window isn’t a modal frame type, there is no difference.

Hello I have similar problem , so I want to reopen discussion.
I just switch to Xojo from Real Studio and I found the code is ceased while Modal WIndow is active.
In latest RealStudio code continues with active modal windows.
SO now I need solve my problem - I need modal window with continuing code.
Or way how to disable access to other opened windows without closing these.

Thanks

Martin

The best way I have found to do this is in the mouse click event for the button, check to see if the other window is open.
Example

[code] //Checks to see if a Window is open

Dim i as Integer
Dim isopen as Boolean = false
for i = 0 to WindowCount
if Window(i) isa myWINDOW Then
//Windows is open Code Here
exit
Else
//Windows is not open code Here

end if 

next [/code]