OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Peter2 on May 13, 2015, 02:53:15 AM

Title: Keep a dialogue in the foreground?
Post by: Peter2 on May 13, 2015, 02:53:15 AM
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?
Title: Re: Keep a dialogue in the foreground?
Post by: Fred Tomke on May 13, 2015, 08:55:48 AM
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
Title: Re: Keep a dialogue in the foreground?
Post by: Peter2 on May 15, 2015, 06:19:59 AM
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.

???
Title: Re: Keep a dialogue in the foreground?
Post by: owenwengerd on May 15, 2015, 07:57:20 PM
Is it possible to reproduce the problem without the dos_msgboxex?
Title: Re: Keep a dialogue in the foreground?
Post by: Fred Tomke on May 16, 2015, 02:18:15 AM
Hello, Peter2,

it's difficult. I meant something like this topic (http://www.opendcl.com/forum/index.php?topic=1091.msg5742#msg5742) and this topic (http://www.opendcl.com/forum/index.php?topic=29.msg127#msg127) (last paragraph).
Actually, I'd prefer to give dcl-messagebox a chance.

Regards, Fred
Title: Re: Keep a dialogue in the foreground?
Post by: Peter2 on May 16, 2015, 09:08:25 AM
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.
Title: Re: Keep a dialogue in the foreground?
Post by: owenwengerd on May 16, 2015, 10:21:35 AM
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.