Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Can't Capture Ctrl-F4 in MDI Form
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);
}


Report this thread to moderator Post Follow-up to this message
Old Post
PMGuy
05-31-05 09:01 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

C# archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:35 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.