switching between MDI child forms

L

Leslie

To switch between the child forms in an MDI app, you can use ctrl-tab.
I want to eliminate that option. I don't want to let the users
switch between the children. I tried using KeyPress and KeyDown in
the MDI parent form but I couldn't catch both the ctrl and tab clicks.
Any suggestions? Thanks in advance.
 
T

Telmo Sampaio

I checked into this, and I believe you do *not* want to use an MDI form in
this scenario.

Telmo
 
L

Leslie

I have to use an MDI form. I tried doing an override of the
OnKeyPress event but it doesn't get fired. I also tried KeyPress and
KeyDown events on the MDI parent form and the KeyDown gets fired, but
i am unable to capture the ctrl-tab combo. It is only seeing one of
the items. Here is the code:

private void FrmParentMDI_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.Tab && (ModifierKeys & Keys.Control) != 0)
{
e.Handled = true;
}
}

Thanks
 

Ask a Question

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.

Ask a Question

Top