I am developing a small application ,
Using C# 4.0 Visual Studio 2012
I am making my Windows Form Hidden on Form_Load but now I want even it is in hidden state it should always detect certain key event's
if i press [Alt +1] it should respond to my windows application
now the problem comes when i hide the windows and open Google chrome or do any other stuff ,i am losing it's focus and it is not detecting any of my key event's
Code Below
private void CloseProcesses_Load(object sender, EventArgs e) { this.Hide(); this.ShowInTaskbar = false; this.TopLevel = true; this.TopMost = true; this.BringToFront(); } #endregion private void CloseProcesses_KeyDown(object sender, KeyEventArgs e) { if (e.Alt) { //MessageBox.Show("alt pressed"); foreach (Process myProc in Process.GetProcesses()) { if (myProc.ProcessName == ProgramName) { myProc.Kill(); } } } } }