Keep a dialogue in the foreground?

Started by Peter2, May 13, 2015, 02:53:15 AM

Previous topic - Next topic

Peter2

I have a modeless dialogue with calls a modal sub-dialogue. Normally it works fine, but - ..

I don't know how I managed it, but one time I had the "older" (and bigger) modeless dialogue which covered the younger (and smaller) modal dialogue. Now I had a (Mexican) standoff - the modeless covered the modal which waited for my input which I could not give it because it was covered by the locked modeless.

Is there a way to keep a dialogue in the foreground of the screen?
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Fred Tomke

Yeah! I know this, too. Try Alt-Tab to switch between programs. Turn back to AutoCAD, the modal form should be top most now.
I believe it depends on some settings on the modeless form that focus turns back to the modeless form. Have a game with KeepFocus of the form an EventInvoke of the button which opens the modal form.

Sorry, I know, it is a fight against the symptoms but not the causes.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Peter2

#2
Quote from: Fred Tomke on May 13, 2015, 08:55:48 AM
...Have a game with KeepFocus of the form an EventInvoke of the button which opens the modal form...
Sorry - I don't understand. can you explain it in another way?

PS:
At the moment I can reproduce it.

- Modeless form with a button
- Button-onclicked displays a "dos_msgboxex"
- the second button of the dos_msgboxex calls
Code (autolisp) Select
(setq wahlpfad_d (dcl-SELECTFOLDER "Verzeichnis wählen" wahlpfad_d nil 593))

- If I click immediately on the new selectfolder-dialogue, it is Ok.
- If I wait half a second, the modeless form jumps to the foreground.

???
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

Is it possible to reproduce the problem without the dos_msgboxex?

Fred Tomke

Hello, Peter2,

it's difficult. I meant something like this topic and this topic (last paragraph).
Actually, I'd prefer to give dcl-messagebox a chance.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Peter2

Hi

I think I found the problem:
If the "dos_msgboxex" (DosLib) is displayed in the foreground of the modeless-dialogue, then I have the described problems (today the dialogue to select folders is OK, but select-files is a problem ..).

But if I move the dos_msgboxex to the side so that it buttons are not covering the dialogue behind, then it is OK.
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

owenwengerd

It would be helpful if you can create a simple self contained modeless form and associated code that I can use to reproduce the problem. I will also need to know the p;latgform, and to make sure you are testing with the latest version of OpenDCL.