C# ChromiumWebBrowser: Prevent control from stealing focus -


there have been many similar questions, not solved problem.

i'm doing program has form chromiumwebbrowser in it. navigation done automatically. when webbrowser complete it's task, i'll dispose it, create new webbrowser, add form, , load new address.

but, when new webbrowser created , added form, program jumps in front of ever other program in top focus. example: start program, press button start task, open notepad type text , program jumps in front of when navigating new site.

even when program minimized, don't jump in font of, still steals focus, , no program has focus.

please me! alot!

  1. your form need set: this.topmost = false; , set: this.bringtofront();

  2. add new browser form function follow:

    private chromiumwebbrowser addnewbrowser(fatabstripitem tabstrip, string url) { if (url == "") { url = openurl; txturl.select(); txturl.focus(); } else { tabstrip.select(); tabstrip.focus(); }

            .......................         .......................         .......................     } 

hope has you. !


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -