Csharp/CSharp Tutorial/2D/Ico — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 18:31, 26 мая 2010
Load an ico file
<source lang="csharp">using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Collections; using System.ruponentModel; using System.Windows.Forms; using System.Data; public class BitmapLoading : System.Windows.Forms.Form {
public BitmapLoading() { this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(400, 400); this.Paint += new System.Windows.Forms.PaintEventHandler(this.BitmapLoading_Paint); } static void Main() { Application.Run(new BitmapLoading()); } private void BitmapLoading_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Graphics g = e.Graphics; Bitmap b = new Bitmap("1.ico"); g.DrawImage(b, 10, 10, 350, 300); }
}</source>