0

I'm developing program perform multiple tasks in the loop, use 3rd party libraries. But when it's done a job, it automatically appears in front of screen, made me lose focus. How to disable auto appear? I've tried:

private void FrmMain_Activated(object sender, EventArgs e)
{
    SendToBack();
}

But it was only after the program appear, bring it back to the rear. I want to prevent it bring to front from the firt. Please help me!

Minh Giang
  • 631
  • 9
  • 28
  • 1
    Is it something in the third-party libraries that causes your form to bring to front? To my best understanding, if you run a form, start some process, minimize the form or switch to another application, it should stay minimized or out of view. Are these libraries WinForms controls, or have WinForms controls? – CoolBots May 08 '16 at 04:16
  • I'm using ChromiumWebBrowser for winforms. Even I minimized my progam and switched to another program, it still make lose focus... – Minh Giang May 08 '16 at 04:22
  • Crazy idea, but what if you made your form an MDI Child of another form? It should prevent the parent form from coming up, I think – CoolBots May 08 '16 at 04:25
  • http://stackoverflow.com/questions/21894343/enable-disable-activation-of-a-form – mohsen May 08 '16 at 04:27
  • http://stackoverflow.com/questions/4037250/how-do-i-create-an-unfocusable-form-in-c – mohsen May 08 '16 at 04:28
  • http://stackoverflow.com/questions/7750517/notification-window-preventing-the-window-from-ever-getting-focus – mohsen May 08 '16 at 04:29
  • @mohsen all don't work for me :( – Minh Giang May 08 '16 at 04:50

0 Answers0