I've been looking around and cant seem to find any of the help I need for my program I need it so when I click a specific button(F9) It hides the program from taskbar. After its hidden from taskbar I need to be able to click a button(F10) to make it Show in task bar again. Currently when I run it F9 Hides it but F10 wont show it
private void Menu_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F9)
{
SecHiden.PerformClick();
}
if (e.KeyCode == Keys.F10)
{
SecShow.PerformClick();
}
}
private void SecHiden_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;
}
private void SecShow_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = true;
}
}
}
EDIT: i've figured out the error just need help fixing it I have to be tabbed into the program for the Keybinds to work is there a way to fix this? I would like to able to use the keybinds when im on Any specift tab(F10 Wouldnt show the tab because I wasnt tabbed onto the program to make the keybind work)