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!
your form need set: this.topmost = false; , set: this.bringtofront();
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
Post a Comment