Form automatically losing Focus after activation

  • Thread starter Thread starter DomGo
  • Start date Start date
D

DomGo

Hi,

I try to open a form, that automatically loses focus to the window, that had
the focus immediatly before the new form has been opened. The new form is
topmost and displays a message only for a certain time, while the user can
work on his current window.

Everthing works except the fact, that the opened form gets the focus. I
tried to catch the WindowsActivated Event to pass the focus back to the
"LostFocus"-Window. But for any reason that does not work.

Has anyone another simple solution?

Bye,
Dominik
 
I would probably do the re-activation in the calling form rather than the
called one. Try something like this in the main form:


Dim f As New Form2
f.Show()
Me.Focus()


Hope this helps,

Brian Davis
www.knowdotnet.com
 
Back
Top