469,588 Members | 2,688 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,588 developers. It's quick & easy.

Using function keys to change Tabs ... and F8 kills it all ... AAAAAAAAAARGH

Greeetings All ..

For my users convenience I have mapped function keys F2 .. F12 to change
the tabs on the Tabcontrol.

Works like a charm <ominous musicuntil one hits F8</ominous music>

That particular tabpage has a webbrowser object embedded in it .. and after
it flicks to that tabpage it no longer plays nice with the other Tabpages
.. click on another Tab using the mouse and all is wonderful again. (unless
you hit the dreaded F8)

below is my function for key trapping :

protected override bool ProcessDialogKey(Keys keyData)
{
switch (keyData)
{
case Keys.Control | Keys.M:
toggle_maintenance();
break;

case Keys.F2:
changeActiveTab(0, 0);
break;

case Keys.F3:
changeActiveTab(1, 0);
break;

case Keys.F4:
changeActiveTab(2, 0);
break;

case Keys.F5:
changeActiveTab(3, 0);
break;

case Keys.F6:
changeActiveTab(4, 0);
break;

case Keys.F7:
changeActiveTab(5, 0);
break;

case Keys.F8:
changeActiveTab(6, 0);
break;

case Keys.F10:
open_downtime_dialog();
break;

case Keys.F11:
new_job_screen();
break;

case Keys.F12:
open_shift_dialog();
break;

default:
/// nothing to do here ... move along
break;
}

return base.ProcessDialogKey(keyData);
}

Does the browser being active steal control of my function keys .. is there
a way around it? Do I have to sue some-one for mental anguish and never have
to write software again ????

---------------------------------------------
[Sam Samson] - There is no greater folly than fixed price quoting.
Sep 20 '07 #1
1 1883
Hi,

Does the browser being active steal control of my function keys .. is
there a way around it? Do I have to sue some-one for mental anguish and
never have to write software again ????
Most probably. What if you use the messagehook to try and override it?
Sep 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by David Gerstman | last post: by
4 posts views Thread by Michael Sparks | last post: by
11 posts views Thread by Pontus F | last post: by
1 post views Thread by ansc1 | last post: by
8 posts views Thread by Conan Kelly | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.