P
PMGuy
Hopefully, I'm missing something real simple in front of my face.
I've used the ProcessDialogKey override and I'm able to capture *most*
shortcut keystrokes, except for the one I'm really interested in.
It seems that the CTRL+F4 keystroke is being captured someplace before
my override can get it. Right now, because I can't capture the
CTRL-F4, the app uses ALT-X to close a MDI child. It works, but I hate
it.
What am I missing? Is there a setting someplace to force a MDI child
to execute the CLOSE() method? Does anyone know what is capturing the
CTRL+F4? I noticed a similar issue in VB6 that seemed to be related to
which types of controls had focus, but I couldn't actually duplicate
that in C#.NET.
Any help would be greatly appreciated.
NOTE: Here's the code that I'm using:
protected override bool ProcessDialogKey(Keys keyData)
{
switch (keyData)
{
case (Keys.Control | Keys.F4):
this.Close(); \\ NEVER FIRES
return true;
case (Keys.Alt | Keys.X):
this.Close(); \\ Used as a back-up to close form
return true;
};
return base.ProcessDialogKey(keyData);
NOTE: This is a duplicate post from the "general" group. I
cross-posted here because there seems to be more activity here. (I'm a
newbie)
I've used the ProcessDialogKey override and I'm able to capture *most*
shortcut keystrokes, except for the one I'm really interested in.
It seems that the CTRL+F4 keystroke is being captured someplace before
my override can get it. Right now, because I can't capture the
CTRL-F4, the app uses ALT-X to close a MDI child. It works, but I hate
it.
What am I missing? Is there a setting someplace to force a MDI child
to execute the CLOSE() method? Does anyone know what is capturing the
CTRL+F4? I noticed a similar issue in VB6 that seemed to be related to
which types of controls had focus, but I couldn't actually duplicate
that in C#.NET.
Any help would be greatly appreciated.
NOTE: Here's the code that I'm using:
protected override bool ProcessDialogKey(Keys keyData)
{
switch (keyData)
{
case (Keys.Control | Keys.F4):
this.Close(); \\ NEVER FIRES
return true;
case (Keys.Alt | Keys.X):
this.Close(); \\ Used as a back-up to close form
return true;
};
return base.ProcessDialogKey(keyData);
NOTE: This is a duplicate post from the "general" group. I
cross-posted here because there seems to be more activity here. (I'm a
newbie)