This repository has been archived on 2017-12-27. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
ScreenCapture/Program.cs
2015-09-27 13:30:34 +02:00

30 lines
863 B
C#

using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
namespace ScreenCapture
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Assembly assembly = Assembly.GetExecutingAssembly();
Mutex mutex = new Mutex(true, ((GuidAttribute)assembly.GetCustomAttributes(typeof(GuidAttribute), true)[0]).Value);
if (mutex.WaitOne(TimeSpan.Zero, true))
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm(assembly.Location));
mutex.ReleaseMutex();
}
}
}
}