Adsense_top

2009年8月31日月曜日

C# 変形ウインドウの作成

通知用に通常の形でないウインドウが必要になったので、試してみました。
とりあえず基本ということで丸いウインドウ。


public Form1()
{
InitializeComponent();
System.Drawing.Drawing2D.GraphicsPath path =
new System.Drawing.Drawing2D.GraphicsPath();
path.AddEllipse(0, 0, this.Width, this.Height);
this.Region = new Region(path);
}

本当はWPFでやればいいのでしょうが、簡単だったのでメモしておきます。


0 件のコメント:

コメントを投稿