Software Archive
Read-only legacy content
17061 Discussions

Closing child windows

Intel_C_Intel
Employee
760 Views
This is a problem I have not seen on the message board. We have a program which launches a child windows to display run-time information while the program is executing. It is essentially a dos consol type window. When the program finishes executing, we stop the display. The user is then prompted to press the enter key to clear the window and return to the parent window.

Here's the problem. On the previous version of the compiler, when the child closed, the parent window regained the focus (became active). Now, the parent window remains inactive (no focus).

This only occurs on w95 and w98. It does not occur with w2000 or wNT.

Thanks in advance

Jim Berthold
support@olisystems.com
0 Kudos
5 Replies
Steven_L_Intel1
Employee
760 Views
This has nothing to do with the compiler. It probably is related to which Windows version you are using. You might need to do a SetFocus on the parent window.

Steve
0 Kudos
Intel_C_Intel
Employee
760 Views
The operating system in this case is w98 on which the code was executed. The code may have been compiled initially in wNT4.0 using the DF6.0 then more recently with w2000 and DF6.1. I will try recompiling with wNT and then DF6.1 to see what happens.

JB
0 Kudos
Steven_L_Intel1
Employee
760 Views
The OS you compile on won't matter - it will be the OS you run on that determines the focus behavior.

Steve
0 Kudos
Intel_C_Intel
Employee
760 Views
A bit more information on this annoying problem. The original code was compiled with DF5.0. On w98, wNT4.0 the parent window/process launched a consol window to display some run time information. On both OS when the child process stopped, the consol window asked the user to "Press any key". When done so, the child window closed and focus was returned to the parent. In both cases, the code was compiled with DF5.0 on the wNT4.0 OS.

When the code was compiled with CVF6.1a the behavior changed on w98 but not wNT. On w98, when the child closed, focus was not returned to the parent. On wNT it was returned to the parent. The code was compiled on the winNT4.0 OS.

We tried to setfocus back to the parent but that did not work. The behavior pattern continues with w2000 behaving like wNT.

This points to a change somewhere in the compiler from 5.0 to 6.1. We are at a loss to explain it and need some help. Much thanks.
0 Kudos
Steven_L_Intel1
Employee
760 Views
I can't imagine how any change in Visual Fortran would affect this behavior. If you would like us to look at it, send a complete example as a ZIP archive of the project to us at vf-support@compaq.com. It would help if you could reduce this to a small example.

Steve
0 Kudos
Reply