-1

I use web browser control in the separate thread and to prevent thread from exit immediately I call Application.Run() in the thread. In that moment when I call Application.Run() the Main Form, from which I created the new thread, leaves focus.

Are there any way to avoid this issue? I need to use WebBrowser control in the separate thread, but don't leave focus from the Main Form when thread is created.

Thanks

Madman
  • 3,171
  • 2
  • 32
  • 44
  • please show some source code... what you describe seems really strange... why are you calling `Application.Run()` on a thread that is not the main thread ??? – Yahia Apr 08 '12 at 18:57
  • 1
    This is a side effect of the browser, not your code. Not sure what causes it, compare with this code: http://stackoverflow.com/questions/4269800/webbrowser-control-in-a-new-thread/4271581#4271581 – Hans Passant Apr 08 '12 at 19:27
  • My code implemented in the same way, I thinks it is not required here. Even in debug mode, when debugger gets the line Application.Run() the main form blinks and leaves focus. – Madman Apr 09 '12 at 09:49

0 Answers0