Form automatically losing Focus after activation

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
 
B

Brian Davis

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top