MDI ignoring Handles for Ctl+F6

P

Paul

I have a MDI form which hosts numerous MdiChildren forms. I want to
prevent the users from toggling to other MdiChildren forms. The
program allows it by pressing Ctl+F6 or Ctl+Tab.

In the MDI form I use the KeyUp event and set Handles = True:

Private Sub FrontierMDI_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
Select Case e.KeyCode
Case Keys.F6
If (e.Control) Then
e.Handled = True
End If
End Select
End Sub

This doesn't work. It still toggles the MdiChildren form. And I do
have the KeyPreview set to True for the MDI form. I have verified that
the e.Handled = True code is run by using Debug.Writline statements.

I also have tried putting this same code in the forms. Nothing has
worked so far.

I would appreciate any help!
 
C

Cor Ligthert

Paul,

Why do you want users to prevent doing standard keyboard handling.

You want a lot of bug reports. Because what you now are making is called a
bug.

Or will you want to show how fast you can repair that?

Cor
 
P

Paul

It's not a bug. My reasons are valid for this feature. What does it
matter to you anyway?

But if you must know, we are converting an application (written in MS
Access) that opens multiple forms. The users only see one form at a
time. The forms are designed as a menu. What this means is that the
first form to show up has a number of buttons on it. Each button will
open a form or report. When that happens that form or report is
displayed within Access (which is a MDI application). To go back to
the previous form they must close the form that is currently being
displayed.

I don't want them to toggle back and forth. Access makes is easy to
disable certain key commands (like Ctl+F6). The ability to toggle back
and forth between forms will confuse my users if they use it. They are
following specific business procedures and must perform the actions in
a specific order.
 

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