bandicam-2018_2D00_02_2D00_12-08_2D00_48_2D00_28_2D00_183.mp4
Okay so this might be a little difficult to explain. Basically we have a cobol screen that has a .net assembly embedded in the screen section. When one of the assemblies functions is activated(which displays another form overlayed on the screen, not another window) the cobol window that had focus loses it's focus, and focus is transferred to last active windows screen that WASN'T controlled by the acucobol runtime(i.e. file explorer). This behavior does not happen when the .net assembly is embedded on a standard windows form outside of the acucobol runtime(i.e. as a simple executable).
We tried switching the .net assembly to run as a stand alone windows form rather than being embedded, but we have a situation where we do not want users to be able to "touch" screens 2 and 3(numbers being screen depth) and the assembly is screen 4. When the assembly is run, all screens are able to be "touched" whereas before they could not be touched until the old screen 4 was closed. Not sure if that makes sense, but that is what we are dealing with. We ARE using a 3rd party control(the assembly is created by us, but the assembly contains other 3rd party dll's), but we can reproduce this behavior without the 3rd party controls.
It's a little difficult to see in the video because you can't see the mouse, but I am basically clicking the filter drop down icon(creates new windows form, focus is lost from main window, which is standard behavior). Nothing happens and we are good. As soon as I click in the main grid area, it SHOULD transfer the focus back to the main window, but as soon as I click anywhere on the screen(grid or not) it looks like the runtime is essentially hijacking the focus transfer and sending it back to the last active screen. Focus transfers fine if I click another application(i.e. file explorer)
#AcuCobol
#.net