F
F
foxlye2019-01-22 16:37:51
C++ / C#
foxlye, 2019-01-22 16:37:51

How to create a background process with your own name?

I welcome everyone. It is necessary that when the button is pressed, a background process with the name specified in the code is launched.
It should be just a process, no windows should appear.

private void button3_Click(object sender, EventArgs e)
        {
        Код на создание процесса
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sumor, 2019-01-22
@foxlye

Create a WinForms project, delete the main form (Form1.cs), open program.cs, delete everything from the Main method and write your code there, at least an infinite loop:

public static void  Main()
{
  while(true)
  {
    Thread.Sleep(100);
  }
}

Such an application will hang in the task manager, but it will not have windows.
To create it, you just need to execute Process.Start("path to exe");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question