I have button and tabcontrol having some tabs on my form. There is webbrowser-control on the second tab. I use a backgroundworker for creating its page. String:
bw.DoWork += new DoWorkEventHandler((s, e) => { webBrowser.DocumentText = "qwerty"; });
is in form constructor after InitializeComponent() and just one string:
bw.RunWorkerAsync();
in button click handler. After the run my application on pressing the button I get "Unable to get the window handle for the 'WebBrowser' control. Windowless ActiveX controls are not supported." But it works correct if I choose the second tab (having webbrowser) before. How can I solve this problem?