-2
Thread main;
public void bomb()
{
string link = textBox1.Text;
for (int i = 0; i <= richTextBox1.Lines.Length; i++)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://" + link + "/");
WebProxy myproxy = new WebProxy(this.richTextBox1.Lines[i], false);
//request.Proxy = myproxy;
request.Method = "GET";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
label1.Invoke((MethodInvoker)delegate { label1.Text = i.ToString(); });
}
}
private void button1_Click(object sender, EventArgs e)
{
main = new Thread(bomb);
main.Start();
}
그러나 라인 액세스를 얻을 수 없습니다 richTextBox1.Lines.Length 및 richTextBox1.Lines을 [I]스레드는 RichTextBox.Lines에
생성 오류 :
Cross-thread operation not valid: Control 'richTextBox1' accessed from a thread other than >the thread it was created on.
하는 경우 richtextbox에서 텍스트를 가져오고 싶습니다만 괜찮습니다.하지만 라인을 얻고 싶으면 에러가납니다.
감사합니다.
는