I have made a small program in C# that I want to run in the background and it should only appear when a certain key combination is pressed. How can I do this?
To allow the program to be completely invisible is, in my opinion, a bad idea. Because the user cannot interact with the program. I would recommend placing it in the SysTray (an icon by the clock in Windows)
trayIcon = new NotifyIcon();
trayIcon.Text = "My application";
trayIcon.Icon = TheIcon
// Add menu to the tray icon and show it.
trayIcon.ContextMenu = trayMenu;
trayIcon.Visible = true;
Visible = false; // Hide form window.
ShowInTaskbar = false; // Remove from taskbar.
To monitor keyboard you can use LowLevel Keyboard hook ( see example ) or attach a hootkey (See example)