I want to run an application that shows up in the "Background processes" section of the 'Processes' tab in the Task Manager (NOT the "Apps" section).
This application is waiting for an external event to occur, when it does a windows form will be displayed.
I don't mind if this form shows in the "Apps" section when it is displayed. However, I want it to only be seen in the "Background processes" section when it's not yet displayed/hidden/not visible/ShowInTaskbar = false/not yet loaded/not yet instantiated/whatever means of not showing the form that will work.
An example program that seems to do this is Skype. When the Skype window is open it is seen in the "Apps" section, but when you close the window and it's no longer shown in the taskbar (only seen as a system tray icon) then it will show up in the "Background processes" section.
NOTE: I've seen so many answers to similar questions say to just .Hide() the form, but this stupidly hides it completely from the Task Manager Processes. Why would you want to do that, unless you're making a virus!
Sorry, I found out that the issue only occurs when debugging the app in visual studio. The background process is actually listed under the Visual Studio App process, not a separate process. I had to expand the 'Microsoft Visual Studio 2017' process to see it.
Though when running the .exe file directly this isn't a problem, the process shows under the "Background processes" as it should.