クリックすると終了します。
using System;
using System.Windows.Forms;
using System.Reflection;
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion ("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0")]
[assembly: AssemblyTitle("EscapeBlack Screen")]
[assembly: AssemblyDescription("光漏れ回避用ブラックスクリーンアプリケーション")]
[assembly: AssemblyProduct("EscapeBlack Screen")]
[assembly: AssemblyCompany("Explorersof the Binary World")]
[assembly: AssemblyCopyright("Copyright(C) 2007-2014 あおと All Rights Reserved.")]
[assembly: AssemblyCulture("")]
class MainProg
{
public static void Main(string[] args)
{
// エントリポイント
Application.Run(new MainWnd());
Environment.Exit(0);
}
}
class MainWnd : Form
{
publicMainWnd()
{
int w, h;
w =System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
h =System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
this.ClientSize= new System.Drawing.Size(w, h);
this.BackColor= System.Drawing.Color.Black;
this.FormBorderStyle= FormBorderStyle.None;
this.StartPosition= FormStartPosition.CenterScreen;
this.TopMost= true;
this.Click+= new EventHandler(MainWnd_Click);
}
private voidMainWnd_Click(object sender, EventArgs e)
{
this.Close();
}
}
コメント