using using using using using using using
system; system.collections.generic; system.componentmodel; system.data; system.drawing; system.text; system.windows.forms;
namespace threads { public partial class form1 : form { public form1() { initializecomponent(); } private void button1_click(object sender, eventargs e) { picturebox1.loadasync(@"d:\shared\photo\backgrounds\backgrounds\117.jp g"); } private void button2_click(object sender, eventargs e) { picturebox1.cancelasync(); } private void picturebox1_loadprogresschanged(object sender, progresschangedeventargs e) { progressbar1.value = e.progresspercentage; } private void picturebox1_click(object sender, eventargs e) { } private void picturebox1_loadcompleted(object sender, asynccompletedeventargs e) { messagebox.show("load completed succesfully"); } } }