Hi Sean,
There is no method in the framework to check the key state except for the
modifier keys (CTRL, SHIFT and ALT).
You have to use KeyDown/Up events or P\Invoke to use the API functions for
that.
For some reason, I am not snagging the event. I have created a base child
form where the derived child form is embedded within an MDI parent
container. The child form is in focus and when I press the appropriate
function key, no event is fired.
My test code looks as follows:
private void ChildViewBase_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.F1:
F1KeyPressed();
break;
case Keys.F2:
F2KeyPressed();
break;
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.