C# 画像の表示、イベントの登録
Posted: 2014年6月08日(日) 11:37
C#を学習中で、リファレンス等を見ながら画像を表示させようとしているのですが、うまくいきません。
デリゲートに一致するaaaのオーバーロードはありません。というエラーがでます。
何がいけないのでしょうか、教えていただきたいです。
using System;
using System.Windows.Forms;
using System.Drawing;
class Test:Form
{
public static void Main() {
Test fm = new Test();
Application.Run(fm);
}
public Test() {
this.Height = 600;
this.Width = 800;
this.Text = "TEST";
this.Paint += new System.Windows.Forms.PaintEventHandler(aaa);
}
private void aaa(PaintEventArgs e)
{
Bitmap mapImage = new Bitmap("c:\\image\\map001.bmp");
Point ulCorner = new Point(100, 100);
e.Graphics.DrawImage(mapImage, ulCorner);
}
}
何がいけないのでしょうか、教えていただきたいです。