void Button1Click(object sender, EventArgs e)
{
//图片异步加载完成后的处理事件
pictureBox1.LoadCompleted += new AsyncCompletedEventHandler(pictureBox1_LoadCompleted);
//图片加载时,显示等待光标
pictureBox1.UseWaitCursor = true;
//采用异步加载方式
pictureBox1.WaitOnLoad = false;
//开始异步加载,图片的地址,请自行更换
pictureBox1.LoadAsync("http://www.zu14.cn/wp-content/uploads/2009/02/image14.png");
}
void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e)
{
//图片加载完成后,将光标恢复
pictureBox1.UseWaitCursor = false;
}
{
//图片异步加载完成后的处理事件
pictureBox1.LoadCompleted += new AsyncCompletedEventHandler(pictureBox1_LoadCompleted);
//图片加载时,显示等待光标
pictureBox1.UseWaitCursor = true;
//采用异步加载方式
pictureBox1.WaitOnLoad = false;
//开始异步加载,图片的地址,请自行更换
pictureBox1.LoadAsync("http://www.zu14.cn/wp-content/uploads/2009/02/image14.png");
}
void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e)
{
//图片加载完成后,将光标恢复
pictureBox1.UseWaitCursor = false;
}
本文转自黄聪博客园博客,原文链接:http://www.cnblogs.com/huangcong/archive/2010/03/26/1697091.html,如需转载请自行联系原作者