H
Houston Keach
I've found postings of others having this problem but I haven't seen a
definitive answer. From my main form, I open child forms using
ShowDialog(). If they are closed in the normal fashion, all is well.
However, I have a session timer in my main form that logs the user out
after a period of inactivity and I close any child form that is open
by calling Form.Close().
When I do this, my application loses focus. Calling
Form.BringToFront() has no effect. I have worked around the problem
by calling SetForegroundWindow() on the main form immediately after
closing the child form but I don't think this should be happening.
Any ideas?
--Houston
definitive answer. From my main form, I open child forms using
ShowDialog(). If they are closed in the normal fashion, all is well.
However, I have a session timer in my main form that logs the user out
after a period of inactivity and I close any child form that is open
by calling Form.Close().
When I do this, my application loses focus. Calling
Form.BringToFront() has no effect. I have worked around the problem
by calling SetForegroundWindow() on the main form immediately after
closing the child form but I don't think this should be happening.
Any ideas?
--Houston