C # drawing flashes

Source: Internet
Author: User

Http://www.cnblogs.com/Cybean/archive/2012/01/12/2321014.html

 

Other methods:

The contents of the element control are divided into two parts: frequent refresh and rarely refresh.

Add picturebox to the control, save the rarely refreshed part as a bitmap in the memory, and then display it in picturebox.

 
Bitmap BMP = profilebitmap (This. _ Lilines, toltallength );This. Picturebox1.image = BMPAsImage;
         Public Bitmap profilebitmap (list <profileline> li_lines, Double  Linelength) {bitmap BMP = New Bitmap (800 , 600  ); Graphics g = Graphics. fromimage (BMP); drawaxis (g );  For ( Int I = 0 ; I <= This . _ Lilines. Count- 1 ; I ++) //  Draw wired  {Drawoneprofileline (G, li_lines [I]);} drawgraduationx (G, linelength ); //  Add horizontal axis Scale Drawlengenditems (G, li_lines ); //  Add legend              Return  BMP ;} 

 

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.