ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.'
Code
string account = listBox1.Items[i].ToString();
BackgroundWorker backgroundWorker;
backgroundWorker = new BackgroundWorker();
backgroundWorker.DoWork += new DoWorkEventHandler(CheckSpotify);
backgroundWorker.RunWorkerAsync(account);
Thread.Sleep(2000);
private void CheckSpotify(object sender, DoWorkEventArgs e) {
string account = e.Argument.ToString();
string[] Account = account.Split(':');
string user = Account[0].ToString();
string pass = Account[1].ToString();
WebBrowser w1 = new WebBrowser();
w1.Navigate("https://accounts.spotify.com/en-GB/login?continue=https:%2F%2Fwww.spotify.com%2Fuk%2Faccount%2Foverview%2F");
HtmlDocument doc = this.w1.Document;
HtmlElement username = doc.GetElementById("login-username");
HtmlElement password = doc.GetElementById("login-password");
username.SetAttribute("value", user );
password.SetAttribute("value", pass);
username.Focus();
SendKeys.SendWait("~");
}


![[Image: Syr3DlV.png]](https://i.imgur.com/Syr3DlV.png)