国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > C# > 正文

C#手工雙緩沖技術(shù)用法實(shí)例分析

2020-01-24 01:44:12
字體:
供稿:網(wǎng)友

本文實(shí)例講述了C#手工雙緩沖技術(shù)。分享給大家供大家參考。具體如下:

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace advanced_drawing{  public partial class Form19 : Form  {    BufferedGraphicsContext bufferContext;    Bitmap gif = new Bitmap(@"d:/我的文檔/桌面/ico/a.GIF");    public Form19()    {      InitializeComponent();      bufferContext = new BufferedGraphicsContext();      bufferContext.MaximumBuffer = this.ClientRectangle.Size;    }    void gif_FrameChanged(object sender, EventArgs e)    {      Graphics g = this.CreateGraphics();      BufferedGraphics frame = bufferContext.Allocate(g, this.ClientRectangle);      ImageAnimator.UpdateFrames(gif);      frame.Graphics.DrawImage(gif, this.ClientRectangle);      frame.Render();    }    private void Form19_FormClosing(object sender, FormClosingEventArgs e)    {      bufferContext.Dispose();    }    private void Form19_Paint(object sender, PaintEventArgs e)    {      if (ImageAnimator.CanAnimate(gif))      {        ImageAnimator.Animate(gif, gif_FrameChanged);      }    }  }}

希望本文所述對大家的C#程序設(shè)計(jì)有所幫助。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 新民市| 杭锦后旗| 方城县| 渝中区| 临朐县| 长沙县| 虹口区| 洪江市| 肥东县| 安阳县| 新蔡县| 泌阳县| 桐柏县| 泰安市| 广水市| 齐河县| 临海市| 曲阜市| 扬州市| 五常市| 梨树县| 彰化县| 德昌县| 宁城县| 蒲江县| 铁力市| 昭觉县| 临泽县| 泽州县| 蒙山县| 临城县| 锡林浩特市| 涞水县| 方山县| 苏尼特右旗| 木里| 台州市| 玉林市| 六盘水市| 泗水县| 田林县|