|
private static ManualResetEvent man=new ManualResetEvent(false);
public string play()
{
string url = "http://127.0.0.1/code.php";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
using (WebResponse response = request.GetResponse())
{
Image img = Image.FromStream(response.GetResponseStream());
pictureBox1.Image = img;
}
if (pictureBox1.Image != null)
{
//获取图片后我想先在textbox中输入验码,在这里如何跳转到输入框呢
man.waitone();//等待有textbox1中有数据输入,然后直到textbox中按下enter键才返回textBox1.Text;
}
return textBox1.Text;
}
第一,先获取验码图片
第二,等待输入框的验码输入
第三,输入框的回车事件中函数调用man.set,
求大神指教
|
|