Window opens in modal mode

When I open a window from out an application it opens in modal mode, so locking the controls in the window. Is this still a bug or is there a way to open another window from your application with all controls unlocked.

“<”, opens modal, controls locked

“Dim SearchWindow as SearchTopic”
“SearchWindow = new SearchTopic”, opens also in modal mode, controls locked.

Someone has an anwer?

What does locking the controls having to do if the window is shown as modal or not?

“” is not identical to “dim w as new searchtopic” because new does not mean show.


Do you mean the controls of the parent window? They are always locked when using window type modal. You should try other window types?
What do you want to achieve?

I mean, no matter what I do to open a new or existing window with controls from of my application, I cannot touch the controls. They are locked.
When hoovering over the controls (push-buttons) I see they will be selected by a focus ring, but when I push them you only hear a beep and the button looks frozen. It will also not execute the code under it.

I do not use type modal. They just appear that way.

if that happens, something in the Open (or Opening ) event is causing the window to display.
What is in there?

I cannot touch the controls. They are locked.
when I push them you only hear a beep and the button looks frozen

Beeping usually happens if you are trying to ‘touch’ then by pressing the Return key when there is no ‘Default’ button on a window in Windows builds.

Do you have setfocus being used anywhere on the window?

In the window I have currently only a default cancel button. The beep occurs when I press with my mouse on it. The focus ring is on the cancel button, when I press cancel I only hear a beep and nothing happens.

Can you reproduce it with a little sample project you can share to us?


Sounds like you are showing your Modal Dialog by calling it from another Window, but then referencing back to the previous Window. Like when you are accessing a Property of this previous Window.

Example-1, working in an older (2016r3) code:

Dim SearchWindow as New SearchTopic

On this window are several controls like listbox, textbox, pushbuttons and all work without problem

Example-2, working under 2023r4

Dim DetWindow as BuoyDetail

DetWindow = new BuoyDetail

On this Window there is a HTML viewer showing further details from the web and a push button to close the window. All works without problem.

So, I have no clue, using the last example in my new application, why the controls cannot be used. All beep when I point on it and press button with my mouse.

The primary application from which the second window is opened in non-modal, just a document.

Sadly, this doesn’t say anything new or show us any of the code.
Can you make a (simple document window) plus (HTML window) version of the app and put it online for download?

I think there must be something in my code. When I made a simple example for you, it did work, I could press the button on the new loaded window. I have to search. Thank you.

I’ve noticed that if you open a new window from the UnhandledException event on App that the window is very oddly behaved. It doesn’t seem to work with Focus on controls and it doesn’t respond to system Light / Dark mode switches. To get around this I open the window from a method that I called with Timer.CallLater, in order to allow the exception handing to end. I’ll draw up a bug report on this one soon.

I don’t suppose that has anything to do with your issue?

1 Like

That might be the problem. I changed the code into the code of my other application where it does work and in my new application again it doesn’t work. I even changed the name of the window I call into the one of the working code and changed the code into the working code, but as soon as the Window appears I press the cancel button (default button) to close the window, but only a beep and the window stays open.

I’ve seen that sort of behavior when I have a modal dialog, usually a msgbox, opened by that window, but it appears behind the window. Alt-Tab away and back again. Sometimes that is enough to redisplay the window with the message dialog in front.