Microsoft Visual Studio 2005 の Visual C# 8.0 で普通に Windows アプリケーションを作成すると、出来上がったプログラムは、それを実行するたびに 2 つ、3 つと起動させることが出来ます。 例えば文書を編集するようなソフトウェアだったりするとそれは便利だったりするのですけど、システム状態を監視しているソフトのように 1 つだけ動けば十分なものや、中には複数動くと困るような場面が出てくることもあって。そんなときに気にする必要が出てくるのが、今回の二重起動のお話しです。 二重起動を阻止する方法としてはいろいろな方法があるのでしょうけど、とにかく 2 番目に起動することとなったアプリケーションが、既に起動されているものを検出することが出来ればいい感じになります。そして既に起動されていることが分かったら自分自身は終了してあげれば、二重起動を防止するこ