C# | Force application to run only one instance in windows

preview_player
Показать описание
In this video, we will learn how to force c# application to run only one time in windows. We will use winform application as sample project!

If find this video useful, don't forget to subscribe!

Visit my Free Products:

More Videos!

C# | Force application to run only one instance in windows

C# | Winfrom | Centering a Form on screen at application start

C# | Winform | DatagridView textBox AutoSuggest - Tutorial

C# | Adding items in BindingSource

C# | Winform | Binding Navigator Tutorial

C# | How to Get Font List in listbox using bindingsource| Tutorial

C# - Wrapper Class Tutorial

C# | WinForm Control | BackgroundWorker Usage, Event - Example 1

How to enable NET core winform designer in visual studio 2019

Visual Studio Code Java: The "path" argument must be of type string. Received type object.

Visual Studio Code Java: The "path" argument must be of type string. Received type object.

How to enable virtual space in visual studio 2019

How to enable autocomplete feature of visual studio 2019

C# - Cross thread operation not valid: control accessed from a thread other than a thread... SOLVED

C# | How to convert list to object array?

C# | Add items to combo box using add range function

C# | How to find all serial ports available in c# application.

C# | Add item to combobox dynamically.

How to change c# application icon?

HRESULT: 0x8007000B An attempt was made to load a program with an incorrect format. | Solved

C# | Using Datetimepicker to sort Datagridview rows
Рекомендации по теме
Комментарии
Автор

Working like a charm ! Thanks my dud !

crisantopovis
Автор

Thanks. I do not like returning null objects, so I modified your code to return what I am after:
private static bool IsRunning()
{
Process proc = Process.GetCurrentProcess();
Process[] procs =
return procs.Any(p=>p.Id != proc.Id && p.MainModule.FileName == proc.MainModule.FileName);

}
Thanks for showing how it is done.

deltaphilip
Автор

Hi, do you have equivalent code in vbsctipt like that
Single instance execution?

cyrusca
Автор

Thank you for sharing the video. The content is great and helpful to me. Thank you.

brucel
Автор

any code to make another app/game to run multiple instance?
thx before

Pootatozz
Автор

What if someone changes the name of .exe?

SussyMilka
join shbcf.ru