question

DanielMigale-6439 avatar image
0 Votes"
DanielMigale-6439 asked RLWA32-6355 commented

How can I set an application to be run as a background process?

Hello everyone, I created an application which gets invisible when it's minimized (a notification appears, as well as a little icon near the time, the date, wi-fi icon, in the Windows toolbar); everything works fine, but the problem is that, when I open the task manager and the program is minimized, the process appears in the "main processes" list; other programs which work like mine (they disappear when they are minimized), appear in the "background processes" list.

Why is this happening? Why does my program appear in the "main processes" list when it's minimized, while other programs correctly appear in the "background processes" list?

Is there a way to fix this problem? It would be very helpful for me.

Thanks.

vs-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered

If you want your process to appear as a "background process" when you minimize your window you should also hide it.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DanielMigale-6439 avatar image
0 Votes"
DanielMigale-6439 answered RLWA32-6355 commented

How? What's the C# code for this?

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Assuming you are using a Windows Forms application - See how-to-detect-when-a-windows-form-is-being-minimized
And when you detect that your Form has been minimized set its Visible property to false.


0 Votes 0 ·

I fixed in another way, I just used the instruction "this.Hide();". Thank you very much for the answer, very helpful!

0 Votes 0 ·

Glad to help. If my guidance to hide the form when minimized solved your problem kindly accept the post as an answer.

0 Votes 0 ·