How to prevent other windows from appearing between openedge

Posted by cverbiest on 06-May-2019 12:22

We have an issue where other windows (Excel/outlook/any windows application) appear between our application window.

The "OE Embedded child window" is started from the "OE Embedded window", the other window (e.g. Excel) is behind our menu to start with.

During the start of the child window the excel window comes to the front.

What causes this ?

How can we prevent this from happening ?

We see this behaviour in windows 10 and on Windows 2016 RDS.

I have been trying to trace when this happens but this is AFAIK nearly impossible.

When I put a message (view-as alert-box) in the code during the start of the child window, the issue does not occur.

Is there code equivalent to a message statement that does not show a message ?

All Replies

Posted by cverbiest on 06-May-2019 12:24

The screenshot I pasted in the previous post does not appear.

2nd try

Posted by gdb390 on 06-May-2019 12:26

do you have the debug alert enabled in your appliaction, sometimes this causes screen to switch

Posted by Matt Gilarde on 06-May-2019 12:55

By default, applications which use only ABL windows will keep their windows together so that windows of other applications can't get between them. We had to disable this behavior for .NET forms because the mechanism we use to do it doesn't play nicely with .NET forms.

You may be able to replicate the behavior by handling the form's Activate event and bringing each of your forms to the foreground, back to front so they stay in the same order. This may result in unacceptable flickering.

Posted by cverbiest on 06-May-2019 13:37

We use debug-alert for developers only. This behaviour is seen by both developers & end-users.

I tried turning debug-alert off but it makes no difference.

I do notice that adding a dailog-box (seems to) prevents this issue from occuring.

I tried using process events in the same spot but that does not help.

Is there something special with the dialog box ?

Posted by jquerijero on 06-May-2019 14:55

I normally see this behavior when the application switches to "nonresponsive" mode in between opening windows.

Posted by cverbiest on 07-May-2019 08:50

In this particular case I see it always but I'm clueless about what triggers the behaviour here.

Posted by cverbiest on 07-May-2019 11:40

[mention:931f7f12516e4daa930b60341926d260:e9ed411860ed4f2ba0265705b8793d05] I was able to create some kind of work-around by toggling the TopMost property of the Forms. Thanks foe the suggestion.

As you indicated this results in a great deal of flickering.

I'm still wondering how and why the message statement prevents the problem (in this case).

Is there something I could code at the same spot in our code to do everything a message view-as alert-box does, except for showing the alert.

I tried up to 5 process event statements but that has no effect.

Posted by Matt Gilarde on 07-May-2019 11:51

We disable all of the forms and windows of your application when an alert box or dialog box is displayed. I'm guessing that has something to do with why it behaves differently in that case.

We also disable the forms and windows when you set a wait state with SESSION:SET-WAIT-STATE("GENERAL"). Maybe that would behave the same way as alert boxes and dialog boxes. Use SESSION:SET-WAIT-STATE("") to turn off the wait state.

This thread is closed