在控件事件下是有效果的:
private void pictureBox1_Click(object sender, EventArgs e)
{
duowan dts = new duowan();
pictureBox1.ImageLocation = dts.GetCodeUrl();
}
但是在其它类中却没有任何反应:
if (_result.IndexOf("验证码") == -1 && _result.IndexOf("错误") == -1)
{
callbackURL = BetWeen(result.Html, "URL\":\"", "\",", 0);
}
else
{
callbackURL = "error";
string codeUrl = GetCodeUrl();
Form1 image = new Form1();
image.pictureBox1.ImageLocation = codeUrl;
}
初学C#,请各位赐教。谢谢!