Results 1 to 5 of 5

Thread: Simultaneous Webbrowsers not working good

  1. #1

    Thread Starter
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Simultaneous Webbrowsers not working good

    I have a tabcontrol with 2 webBrowsers, one on each tab. One of them is doing some automated stuff sometimes. If I am for example writing in a field in the non-automated browser, and the automated webbrowser starts doing its "thing" the non-automated one looses focus and you can't write in it until the automated is done with its thing.

    What can I do to fix this? Please say if I should describe the problem better.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Simultaneous Webbrowsers not working good

    Only one control can have focus at a time. If your code is setting focus to a control in the page displayed in one WebBrowser then you have no choice but to wait until it's done to set focus to another control.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Re: Simultaneous Webbrowsers not working good

    I don't have it in code to move focus, but do you think it automatically takes focus when for example clicking a button on the website?

  4. #4
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Simultaneous Webbrowsers not working good

    yes, it certainly does

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  5. #5

    Thread Starter
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Re: Simultaneous Webbrowsers not working good

    Quote Originally Posted by Techno View Post
    yes, it certainly does
    Okay, too bad. Anyway to avoid it? Like multithreading or something like that?
    Last edited by Cyb3rH4Xter; Oct 7th, 2011 at 11:49 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width