By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,854 Members | 1,828 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,854 IT Pros & Developers. It's quick & easy.

How to supress Ctrl-F6?

P: n/a
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?
Thank you
Nov 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Alex,

You should be able to hook into the KeyDown event on the main form, and
detect the modifier that is pressed at the same time (the ctrl key). You
should be able to cancel this event.

If that doesn't work, then you can always override the WndProc method on
the main form and then handle the key events there (by handling the windows
message yourself).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?
Thank you

Nov 17 '05 #2

P: n/a
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?


See Nicholas' earlier post on some options to do what you want.

However, you might like to consider that, unless you are writing
applications *only for yourself*, what you like and dislike is largely
irrelevant. Ctrl-F6 is the standard keystroke for moving between child forms
in MDI apps (as you know), so any of your users who've ever used such an app
(e.g. Word, Excel etc) will fully expect to be able to use that keystroke in
your app too, otherwise they might move to another vendor's solution whose
usage is more intuitive to them.

Just a thought...
Nov 17 '05 #3

P: n/a
KeyDown on main form does not work: it is not fired when ctrl-F6 pressed.
Now I am trying to catch it in WndProc

Thanks

"Nicholas Paldino [.NET/C# MVP]" wrote:
Alex,

You should be able to hook into the KeyDown event on the main form, and
detect the modifier that is pressed at the same time (the ctrl key). You
should be able to cancel this event.

If that doesn't work, then you can always override the WndProc method on
the main form and then handle the key events there (by handling the windows
message yourself).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?
Thank you


Nov 17 '05 #4

P: n/a
I wrote "I don't like" just to indicate my problem. For my application it is
absolutely critical to avoid standard MDI behaviour because it appears to
user as a normal single form interface. (only one child is visible at any
particular moment and MDI parent controls the switching between childs based
on functions executed by user).
So don't worry about me losing clients: the app is developed by their specs.

BTW, from options suggested by Nicholas, none seem to work. So, I am still
looking for the right answer...

Thank you

"Mark Rae" wrote:
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
My MDI form has several child forms in maximized state. Pressing Ctrl-F6
causes next child to show, which I don't like. How can I cancel standard
Ctrl-F6 behaviour?


See Nicholas' earlier post on some options to do what you want.

However, you might like to consider that, unless you are writing
applications *only for yourself*, what you like and dislike is largely
irrelevant. Ctrl-F6 is the standard keystroke for moving between child forms
in MDI apps (as you know), so any of your users who've ever used such an app
(e.g. Word, Excel etc) will fully expect to be able to use that keystroke in
your app too, otherwise they might move to another vendor's solution whose
usage is more intuitive to them.

Just a thought...

Nov 17 '05 #5

P: n/a
Alex,

What messages are you looking for in WndProc? There has to be SOME
message that is handling this, you just have to find the right one.

Also, are you calling the base implementation before or after you check
the message in WndProc?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I wrote "I don't like" just to indicate my problem. For my application it
is
absolutely critical to avoid standard MDI behaviour because it appears to
user as a normal single form interface. (only one child is visible at any
particular moment and MDI parent controls the switching between childs
based
on functions executed by user).
So don't worry about me losing clients: the app is developed by their
specs.

BTW, from options suggested by Nicholas, none seem to work. So, I am still
looking for the right answer...

Thank you

"Mark Rae" wrote:
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
> My MDI form has several child forms in maximized state. Pressing
> Ctrl-F6
> causes next child to show, which I don't like. How can I cancel
> standard
> Ctrl-F6 behaviour?


See Nicholas' earlier post on some options to do what you want.

However, you might like to consider that, unless you are writing
applications *only for yourself*, what you like and dislike is largely
irrelevant. Ctrl-F6 is the standard keystroke for moving between child
forms
in MDI apps (as you know), so any of your users who've ever used such an
app
(e.g. Word, Excel etc) will fully expect to be able to use that keystroke
in
your app too, otherwise they might move to another vendor's solution
whose
usage is more intuitive to them.

Just a thought...

Nov 17 '05 #6

P: n/a
I've found the solution.
Message is WM_SYSCOMMAND = 0x112,
and WndProc must be defined in all child forms, but not in MDI paremt form.

Finally, it works!
Thank you

"Nicholas Paldino [.NET/C# MVP]" wrote:
Alex,

What messages are you looking for in WndProc? There has to be SOME
message that is handling this, you just have to find the right one.

Also, are you calling the base implementation before or after you check
the message in WndProc?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I wrote "I don't like" just to indicate my problem. For my application it
is
absolutely critical to avoid standard MDI behaviour because it appears to
user as a normal single form interface. (only one child is visible at any
particular moment and MDI parent controls the switching between childs
based
on functions executed by user).
So don't worry about me losing clients: the app is developed by their
specs.

BTW, from options suggested by Nicholas, none seem to work. So, I am still
looking for the right answer...

Thank you

"Mark Rae" wrote:
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...

> My MDI form has several child forms in maximized state. Pressing
> Ctrl-F6
> causes next child to show, which I don't like. How can I cancel
> standard
> Ctrl-F6 behaviour?

See Nicholas' earlier post on some options to do what you want.

However, you might like to consider that, unless you are writing
applications *only for yourself*, what you like and dislike is largely
irrelevant. Ctrl-F6 is the standard keystroke for moving between child
forms
in MDI apps (as you know), so any of your users who've ever used such an
app
(e.g. Word, Excel etc) will fully expect to be able to use that keystroke
in
your app too, otherwise they might move to another vendor's solution
whose
usage is more intuitive to them.

Just a thought...


Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.