I've set my form's KeyPreview
property to true
.
I've added this code:
private void PlatypusScheduleForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F9)
{
tabControlPlatypi.SelectedTab = tabPageDuckBill;
}
else if (e.KeyCode == Keys.F10)
{
tabControlPlatypi.SelectedTab = tabPagePlatypus;
}
}
When I mash F10, it works as expected; mashing F9, however, does nothing.
tabPageDuckBill
is the design-time/default tabPage
that displays. Why would F10 work in taking me to the "other" tab page, but F9 then not go back to the original?