469,920 Members | 2,190 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

Form automatically losing Focus after activation

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
Nov 20 '05 #1
1 1339

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


"DomGo" <do*****@gorsler.net> wrote in message
news:OX**************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by jason | last post: by
6 posts views Thread by sandy_pt_in | last post: by
3 posts views Thread by Chris | last post: by
4 posts views Thread by Johannes Kiehl | last post: by
5 posts views Thread by Navillus | last post: by
5 posts views Thread by LabGeek | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.