C # Control Refresh

Source: Internet
Author: User

1 intCount =0;2 intSuccess_count =0;3 foreach(stringGeninchFn_gen)4 {5     //MessageBox.Show (gen);6Bitmap Bi =NewBitmap (gen);//Create a bitmap pair image using an open picture path7Image image =Bi;8     if(Image.width >= the&& Image.height >= $)9     { Ten         stringDestinationfile = result + Gen. Substring (Gen. LastIndexOf (@"\"), Gen. Length-gen. LastIndexOf (@"\")); One         BOOLIsrewrite =true;//true= Overwrite an existing file with the same name, false instead A System.IO.File.Copy (gen, Destinationfile, isrewrite); -success_count++; -          This. Txt_count.refresh (); the          This. Txt_count.text = Success_count. ToString () +"/"+count. ToString (); - application.doevents ()///Application.doevents (): Handles all the Windows messages currently in the message queue.  -System.Threading.Thread.Sleep ( -); -     } +count++; -Bi =NULL; + System.GC.Collect (); A}

C # Control Refresh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.